Skip to content

chore: delete dead PYAUTO_SMALL_DATASETS/PYAUTO_FAST_PLOTS from autofit build profiles #111

Description

@Jammy2211

Overview

PYAUTO_SMALL_DATASETS and PYAUTO_FAST_PLOTS are dead config in every autofit-only workspace: nothing that reads them is ever imported there. They are carried in four config/build/env_vars*.yaml profiles across three repos purely by copy-paste from the galaxy/lens workspaces, where both knobs are live.

Surfaced by #321 (the env_vars key-order sweep), which made the two profiles diffable for the first time. The initial read of that finding was backwards — it looked like autofit_workspace_test's release profile was missing two required keys. Checking whether autofit can reach the knobs at all inverted it: that profile is the only one that had it right.

Plan

  • Delete the two defaults: entries (8 lines) from the four autofit-only profiles that carry them.
  • Leave autofit_workspace_test/config/build/env_vars_release.yaml alone — it already omits both.
  • Touch no galaxy/lens/cti workspace, where both knobs are live and load-bearing.
  • Verify with a resolved-env diff whose delta must be exactly those two keys disappearing, and nothing else.
Detailed implementation plan

Evidence that both keys are dead in autofit

  • PYAUTO_SMALL_DATASETS is read only in PyAutoArray (autoarray/util/dataset_util.py, structures/grids/uniform_2d.py, mask/mask_2d.py, operators/over_sampling/over_sample_util.py, operators/convolver.py), PyAutoGalaxy (analysis/model_util.py) and PyAutoLens (point/solver/point_solver.py, weak/simulator.py). Zero occurrences anywhere in PyAutoFit or PyAutoNerves — not even a docstring.
  • PYAUTO_FAST_PLOTS is read in autoarray/plot/utils.py and autogalaxy/util/plot_utils.py (+ autogalaxy/plot/plot_utils.py). In PyAutoFit it appears twice, both in prose — autofit/non_linear/quick_update.py:71 and a test docstring — never in an os.environ lookup.
  • PyAutoFit does not import autoarray (independent by design), and no script under autofit_workspace/scripts, autofit_workspace_test/scripts or HowToFit/scripts imports autoarray / autogalaxy / autolens. The reading code is never loaded.
  • PyAutoFit's single tight_layout() call is autofit/non_linear/live_viewer.py:102, inside the interactive plt.ion() desktop viewer with a window title and signal handlers — it never runs headless in CI. So wiring PYAUTO_FAST_PLOTS up there would buy nothing; deletion is the right call, not implementation.

The stale comments betray the origin: an autofit config currently claims to "reduce MGE gaussians" and skip "critical curve/caustic overlays", both lensing concepts.

This does not violate the release-profile doctrine ("every var this profile cares about gets an EXPLICIT value, not left absent") — autofit cares about neither var, so absence is correct rather than a fall-through hazard.

Affected Repositories

  • autofit_workspace (primary)
  • autofit_workspace_test
  • HowToFit

Branch Survey

Repository Current Branch Dirty?
./autofit_workspace main clean
./autofit_workspace_test main clean
./HowToFit main clean

No active.md worktree claim covers any of these. Suggested branch: feature/autofit-dead-env-knobs

Implementation Steps

  1. Snapshot the resolved env (both profiles x every script, empty base) for the three repos.
  2. Delete the PYAUTO_SMALL_DATASETS and PYAUTO_FAST_PLOTS lines from the defaults: block of:
    • autofit_workspace/config/build/env_vars.yaml
    • autofit_workspace/config/build/env_vars_release.yaml
    • autofit_workspace_test/config/build/env_vars.yaml
    • HowToFit/config/build/env_vars.yaml
  3. Confirm no overrides: entry in any of the three repos references either key (verified: none do), so the change stays contained to defaults:.
  4. Re-snapshot and diff. Unlike #321 the diff will not be empty — assert the delta is exactly those two keys disappearing from every script's resolved env, with no other key added, removed or changed.
  5. validate_env_profiles.py verdicts unchanged from main per repo.
  6. git diff --stat shows nothing but config/build/env_vars*.yaml.

Key Files

  • autofit_workspace/config/build/env_vars.yaml, .../env_vars_release.yaml
  • autofit_workspace_test/config/build/env_vars.yaml
  • HowToFit/config/build/env_vars.yaml
  • PyAutoHands/autohands/validate_env_profiles.pyresolve_clean(), the verification harness. Not modified.

Notes on classification

The Brain Feature Agent returned too-large → split-into-4-phases (score 11) off the 3-repo count. Overridden by judgment: this is an 8-line deletion. Single task, one small PR per repo.

Original Prompt

Click to expand starting prompt

User question that produced this task, following the #321 sweep:

so PYAUTO_SMALL_DATASETS and PYAUTO_FAST_PLOTS are never used by autofit, so how should they be handled

Formalised as PyAutoMind/draft/maintenance/workspaces/autofit_dead_env_knobs.md.

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