Skip to content

fix: release build failures from plot API and autofit bugs #269

Closed

Description

@Jammy2211

Overview

The Apr 10 release build has 345 failures (up from 237 on Apr 9). The spike is almost entirely caused by simulator scripts crashing due to plot API changes, which cascades into ~220+ downstream failures. There are also genuine bugs in PyAutoFit's interpolator and grid search result, plus workspace scripts referencing the removed UltraNest search.

Fixing the library bugs (PyAutoArray zoom_array, PyAutoFit interpolator/grid_search) and updating workspace scripts should bring failures down dramatically.

Plan

  • Fix zoom_array in PyAutoArray to handle plain numpy arrays that have a .mask attribute but no .is_all_false
  • Fix PyAutoFit interpolator.__getitem__ to guard against empty instances list
  • Fix PyAutoFit grid_search_result.log_evidences() to handle None log_evidence values
  • Update all workspace simulator scripts using the removed aplt.Output API to use plot_array's current parameter signature
  • Update autofit_workspace scripts that reference the removed af.UltraNest
  • Re-trigger release build and verify failure count drops
Detailed implementation plan

Affected Repositories

  • PyAutoArray (primary — zoom_array fix)
  • PyAutoFit (interpolator + grid_search fixes)
  • autolens_workspace (simulator scripts, guide scripts)
  • autogalaxy_workspace (simulator scripts)
  • autofit_workspace (UltraNest refs, graphical model dataset paths)

Work Classification

Both (library fixes first, then workspace fixes)

Branch Survey

Repository Current Branch Dirty?
PyAutoArray main minor untracked test files
PyAutoFit main clean
PyAutoGalaxy main minor untracked
PyAutoLens main clean
autolens_workspace main dataset changes (expected)
autofit_workspace main dataset changes (expected)
autogalaxy_workspace main dataset changes (expected)

Suggested branch: feature/release-fixes-apr-2026
Worktree root: ~/Code/PyAutoLabs-wt/release-fixes-apr-2026/

Implementation Steps

  1. PyAutoArray — autoarray/plot/utils.py:108
    Change: hasattr(array, "mask") and not array.mask.is_all_false
    To: hasattr(array, "mask") and hasattr(array.mask, "is_all_false") and not array.mask.is_all_false

  2. PyAutoFit — autofit/interpolator/abstract.py:98
    Guard self.instances[0] against empty list — raise informative error or return early

  3. PyAutoFit — autofit/non_linear/grid/grid_search/result.py:306
    Handle None log_evidence values in the list comprehension (skip or replace with NaN)

  4. autolens_workspace / autogalaxy_workspace simulator scripts
    Replace aplt.plot_array(array=X, output=aplt.Output(path=P, format=F))
    With aplt.plot_array(array=X, output_path=P, output_format=F)
    Affects ~14 active scripts

  5. autofit_workspace scripts

    • Remove/comment UltraNest references in scripts/cookbooks/search.py and related
    • Fix graphical model tutorial dataset paths

Key Files

  • autoarray/plot/utils.py — zoom_array type check fix
  • autofit/interpolator/abstract.py — empty instances guard
  • autofit/non_linear/grid/grid_search/result.py — None log_evidence handling
  • Workspace simulator scripts across autolens/autogalaxy/autofit workspaces

Original Prompt

Click to expand starting prompt

Release Fix: 2026-04-12. Based on release run Apr 10 (run 24226814280). 345 failures, 808 passes, 90 skipped. Priority 1: Simulator Plot API Bugs (~200+ cascading failures) from zoom_array and aplt.Output removal. Priority 2: Source Code Bugs (60 failures) including UltraNest removal, interpolator IndexError, grid_search TypeError. Priority 3: Environment Issues (6, non-blocking).

Activity

  1. Jammy2211 commented on Apr 12, 2026

    @Jammy2211
    CollaboratorAuthor

    Library PRs Created — 2026-04-12

    PRs

    Status

    Workspace changes needed. Next: /start_workspace

    API Changes

    • PyAutoArray: internal fix to zoom_array — no public API change
    • PyAutoFit: GridSearchResult.log_evidences() now handles None values; interpolator.__getitem__ gives clear error on empty instances
  2. Jammy2211 commented on Apr 12, 2026

    @Jammy2211
    CollaboratorAuthor

    All PRs Created — 2026-04-12

    Library PRs

    Build & Workspace PRs

    Summary

    Root causes identified:

    1. zoom_array crashed on plain numpy arrays → ~200 cascading simulator failures
    2. PYAUTO_WORKSPACE_SMALL_DATASETS in PyAutoBuild didn't match library's PYAUTO_SMALL_DATASETS
    3. Scripts loading committed 100x100 FITS with 15x15 mask cap → shape mismatch
    4. UltraNest/PySwarms scripts not in no_run.yaml after removal from PyAutoFit

    Next

    Merge all 5 PRs, then re-trigger the release build.

  3. Jammy2211 commented on Apr 12, 2026

    @Jammy2211
    CollaboratorAuthor

    Shipped — 2026-04-12

    PRs

    Summary

    All 5 PRs merged. Release build re-triggered (run 24312783694, skip_release=true) to verify fixes pass. Root causes: zoom_array crash on plain numpy arrays (~200 cascading failures), mismatched env var name in PyAutoBuild, missing SMALL_DATASETS overrides for tutorial/guide scripts, and removed search packages not in no_run.yaml.

    Session Notes

    • The env var mismatch (PYAUTO_WORKSPACE_SMALL_DATASETS vs PYAUTO_SMALL_DATASETS) was a subtle bug — the workspace-local env_vars.yaml files had the correct name, but PyAutoBuild's fallback config had the wrong one.
    • The shape mismatch fix is a workaround (unsetting the env var for affected paths). The proper fix is migrating ~184 scripts to the should_simulate pattern, which would let SMALL_DATASETS work everywhere.
    • ~37 remaining failures are already marked NEEDS_FIX/SLOW in workspace no_run.yaml files.
  4. Jammy2211 commented on May 28, 2026

    @Jammy2211
    CollaboratorAuthor

    Shipped via #270. Closing.

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