Skip to content

fix: invalidate stale factor-graph subsample instances - #1468

Merged
Jammy2211 merged 1 commit into
mainfrom
agent/factor-graph-subsamples-cache
Aug 11, 2026
Merged

fix: invalidate stale factor-graph subsample instances#1468
Jammy2211 merged 1 commit into
mainfrom
agent/factor-graph-subsamples-cache

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Closes #1467.

What changed

  • add a single model-rebinding helper that clears paths, names, and cached instance
  • use it for SamplesSummary.subsamples, Samples.subsamples, with_paths, and without_paths
  • validate a mode-1 final sample without warming the result-summary cache
  • add direct cache-rebinding tests and a valid-factor-graph end-to-end regression

Root cause

Stage 3 release rehearsal 31517075410 exposed the valid-sample path missed by #1466. Test-mode validation warmed the global factor-graph SamplesSummary.instance. Per-analysis subsamples shallow-copied that cached instance while swapping to a child model, so child results retained the global structure and lacked attributes such as .centre or .galaxies.

This does not change or weaken PyAutoGalaxy's parameter guards. Recovery continues to catch only FitException; unexpected programming errors still propagate.

Validation

  • python -m compileall: pass
  • git diff --check: pass
  • focused/full pytest: delegated to the required Python 3.12/3.13 CI matrix because this cloud runtime does not contain pytest and its package-network installation was unavailable
  • complete Stage 3 rehearsal will be rerun after merge

@Jammy2211
Jammy2211 merged commit 08f73c3 into main Aug 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: invalidate stale factor-graph subsample instances

1 participant