Skip to content

fix: database guide reads dataset info.json that no simulator writes #20

Closed

Description

@Jammy2211

Overview

The dataset_1d database guide chain cannot run from a fresh checkout: scripts/dataset_1d/advanced/database/start_here.py loads dataset/dataset_1d/simple/norm_*/info.json for every norm, but no simulator under scripts/dataset_1d/simulators/ ever writes info.json, so a fresh run raises FileNotFoundError before any model-fit starts. autocti_workspace has no CI, which is why this went unnoticed (found 2026-08-19 during downstream validation of PyAutoLabs/PyAutoFit#1504; evidence on PyAutoLabs/PyAutoFit#1486).

Plan

  • Mirror the autolens database guide pattern: define the (hypothetical) info dictionary inline, with prose noting it could instead be stored alongside each dataset as an info.json and loaded from there.
  • Delete the dead info_list loop (built but never used; the fit currently passes the last loop iteration's info) and the now-unused import json.
  • Validate by wiping the generated dataset + database and re-running the chain fresh under PYAUTO_TEST_MODE=1.
Detailed implementation plan

Affected Repositories

  • autocti_workspace (primary, only)

Branch Survey

Repository Current Branch Dirty?
./autocti_workspace main clean

Suggested branch: feature/database-guide-info-inline

Implementation Steps

  1. In scripts/dataset_1d/advanced/database/start_here.py, replace the __Info__ block's file-read loop (lines ~160-168) with an inline info = {...} dict of hypothetical charge-injection settings, keeping the existing narrative framing.
  2. Reword the block's prose: the dictionary is defined inline here; for real large-dataset fits it would be stored per dataset (e.g. info.json) and loaded instead.
  3. Remove import json (line 28) — its sole use dies with the loop.
  4. Notebook twin (notebooks/.../database/start_here.ipynb) is left to release-time regeneration per workspace convention (notebooks are generated from scripts).
  5. Validate: remove dataset/dataset_1d/simple/, database.sqlite, and stale output/ for this chain; run PYAUTO_TEST_MODE=1 python scripts/dataset_1d/advanced/database/start_here.py from the repo root — must complete from a fresh state with no info.json present.

Key Files

  • scripts/dataset_1d/advanced/database/start_here.py — the only actual info.json read in the repo; other info.json mentions (results/start_here.py, database/examples/samples.py) are prose-only file lists and need no change.

Original Prompt

Click to expand starting prompt

Bug in autocti_workspace: the database guide chain cannot run from a fresh checkout. scripts/dataset_1d/advanced/database/start_here.py line ~165 reads dataset/dataset_1d/simple/norm_*/info.json for every norm, but no simulator under scripts/dataset_1d/simulators/ ever writes info.json, so a fresh run raises FileNotFoundError before any model-fit starts. The repo has no CI, which is why it went unnoticed (found 2026-08-19 during downstream validation of a library change). Fix in autocti_workspace only: write info.json in the dataset_1d simulators, or drop the info.json read from the database scripts.

Activity

  1. added a commit that references this issue on Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions