Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions complete/2026/08/cli-noise-pyautofit-batch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# cli-noise-pyautofit-batch

- shipped: 2026-08-18
- issue: https://github.com/PyAutoLabs/PyAutoFit/issues/1495
- library-pr: https://github.com/PyAutoLabs/PyAutoFit/pull/1496 (`pending-release`) — MERGED 2026-08-18 as `7d4d931`, all 3 checks green (unittest 3.12 + 3.13, docs-build)
- repos:
- PyAutoFit: `claude/pyautofit-cli-noise-fixes-vqs7mg` → `7d1fe19`
- session: Claude Code web (remote); no local worktree

## Summary

The five mechanical fixes from the 2026-08-06 `-W all` CLI-noise audit, in one
PyAutoFit PR (6 files, +42/−5). Each warning was reproduced on `main` first and
shown gone after the fix; full suite on py3.13 + scipy 1.17.1: 1884 passed,
3 skipped.

1. `configure_handler` (`abstract_search.py`) now calls `handler.close()`
beside `removeHandler` in its `finally` — ends the 44-per-run
`ResourceWarning` and file-descriptor leak from `search.log`.
2. `Fit.arrays` carries `overlaps="fit"`, `Fit.hdus` carries
`overlaps="arrays,fit"` (`database/model/fit.py`) — the exact strings
SQLAlchemy 2.0.52's two `SAWarning`s suggest; `configure_mappers()` is now
silent.
3. Nautilus `samples_info_from` reads `.log_z` instead of the deprecated
`evidence()` (nautilus 1.0.5's method is a warn-then-`return self.log_z`
wrapper — exactly equivalent).
4. `LBFGS.options` drops the `disp`/`iprint` keys scipy 1.15 deprecated for
L-BFGS-B (removal slated 1.18); constructor still accepts both, `disp`
stays live for plain `BFGS`; `test_lbfgs.py` pins the contract.
5. `test_fork_context.py` filters both fork warnings module-locally —
CPython 3.12+'s DeprecationWarning *and* JAX's equivalent RuntimeWarning.

## Traps / findings

- **JAX adds a second fork warning.** Once JAX is imported it registers its own
`os.fork()` RuntimeWarning hook, so a filter for CPython's DeprecationWarning
alone leaves the module noisy in JAX-enabled runs. Both are needed; the
regexes differ (`This process` vs `os\.fork\(\) was called`).
- **SQLAlchemy names the fix for you.** The `SAWarning` text contains the exact
`overlaps="..."` string per relationship — reproduce with
`sa.orm.configure_mappers()` under `warnings.catch_warnings(record=True)` and
copy it verbatim rather than deriving the overlap set by hand.
- **Prompt line numbers drift.** The prompt's `bfgs/search.py:194` (filed
2026-08-06) no longer matched; the sites were re-located by symbol
(`options` property / `samples_info_from`), not by line.
- Out of scope, still open on `main`: fork warnings from the dynesty pool tests
elsewhere in `test_autofit/non_linear/search/`, and the deliberately
degenerate-input numerical warnings (`interpolator/covariance.py`,
`messages/normal.py`, `fitness.py`) the prompt marked lowest priority.

## Workflow notes

- Remote web session: `pyauto-heart` unavailable, so the ship gate ran as the
WORKFLOW.md fallback (full repo suite as the verdict); vitals faculty not
consultable — noted here rather than silently skipped.
- Deliberate conflict override (file-disjoint) with the two in-flight PyAutoFit
claims `stored-sample-reconstruction-guard` and `version-stamp-sync-guards`,
documented in the `active.md` entry at registration.
- No workspace impact: API changes "None — internal"; no workspace migration
needed (option iii).

## Original prompt

# PyAutoFit CLI-noise batch: unclosed search.log handler + four small warning fixes

Type: maintenance
Target: PyAutoFit
Repos:
- PyAutoFit
Difficulty: small
Autonomy: safe
Priority: normal
Status: formalised

Filed 2026-08-06 from a full `/cli_noise_clean` audit (full PyAutoFit suite,
1667 tests, `-W all`). Five mechanical fixes, all in PyAutoFit:

1. **Unclosed `search.log` FileHandler (44 warnings/run)** —
`autofit/non_linear/search/abstract_search.py:123-131` (`configure_handler`)
removes the handler in `finally` but never calls `handler.close()`. Add
`handler.close()` beside `removeHandler` at line 131.
2. **SQLAlchemy `SAWarning` relationship overlap** — `Fit.arrays`/`Fit.hdus`
vs `HDU.fit` ("will copy column fit.id ... conflicts"). Add the
`overlaps="..."` parameters SQLAlchemy suggests, in the DB model
definitions (fires from `configure_mappers()`, not the test).
3. **Nautilus deprecation** — `non_linear/search/nest/nautilus/search.py:535`
uses `search_internal.evidence()`; swap to the `.log_z` property.
4. **scipy L-BFGS-B deprecation** — `non_linear/search/mle/bfgs/search.py:194`
passes deprecated `disp`/`iprint` options; drop them per scipy's migration
note (or gate on scipy version).
5. **fork() DeprecationWarning in `test_fork_context.py`** — pytest's thread
pool + `os.fork()`; add a module-local `filterwarnings` mark or use the
`spawn` context in that test where feasible.

Edge-case numerical warnings from tests that deliberately exercise degenerate
inputs (`LinAlgWarning`/`RuntimeWarning` in `interpolator/covariance.py`,
`messages/normal.py`, `fitness.py`) are lowest priority — silence locally in
the triggering tests with `warnings.catch_warnings()`, never globally.
3 changes: 2 additions & 1 deletion complete/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Token-light navigation over the finished-work records (schema:
only then grep a dated bucket. Curators: edit the band between the CURATED
markers; everything below GENERATED is rebuilt.

1021 records across 7 buckets.
1022 records across 7 buckets.

<!-- CURATED:START -->
## Highlights
Expand Down Expand Up @@ -34,6 +34,7 @@ _(curate hard-won records here — survives regeneration.)_
- [border-relocator-degenerate-pca](2026/08/border-relocator-degenerate-pca.md) — Stabilized near-isotropic border PCA axes with a deterministic axis-aligned branch at a scale-aware eigenvalue…
- [circular-ell-comps-image-gradient](2026/08/circular-ell-comps-image-gradient.md) — Replaced the Sersic image path's Cartesian-to-polar ellipticity conversion with an algebraically equivalent Ca…
- [cli-noise-autonerves-batch](2026/08/cli-noise-autonerves-batch.md)
- [cli-noise-pyautofit-batch](2026/08/cli-noise-pyautofit-batch.md)
- [clipper-usage-in-search-summary](2026/08/clipper-usage-in-search-summary.md) — `search.summary` now reports prior-support clipping. `n_clipped_lane_steps`
- [clipper-validation-campaign](2026/08/clipper-validation-campaign.md)
- [compile-axis-campaign-coverage](2026/08/compile-axis-campaign-coverage.md)
Expand Down
54 changes: 26 additions & 28 deletions dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Tasks only — the organism's health lives with the Heart (`/health`), not here.
| [In flight](#in-flight) (`active/`) | 3 |
| [Parked](#parked) (`parked.md`) | 1 |
| [Planned](#planned) (`planned.md`) | 7 |
| [Backlog](#backlog) (`draft/`) | 129 |
| [Backlog](#backlog) (`draft/`) | 128 |

Live on GitHub: [open issues](https://github.com/search?q=org%3APyAutoLabs+is%3Aissue+is%3Aopen&type=issues) · [open pull requests](https://github.com/search?q=org%3APyAutoLabs+is%3Apr+is%3Aopen&type=prs)

Expand All @@ -34,7 +34,6 @@ Live on GitHub: [open issues](https://github.com/search?q=org%3APyAutoLabs+is%3A

**Quick wins** (small enough, and safe enough to run unattended)

- [PyAutoFit CLI-noise batch: unclosed search.log handler + four small warning](draft/maintenance/pyautofit/cli_noise_pyautofit_batch.md) — pyautofit · small · safe · normal
- [Tenant firewall: release_run.py carries an unlisted 'PyAutoLabs' instance fact](draft/bug/pyautoheart/tenant_firewall_release_run_instance_fact.md) — pyautoheart · small · safe · normal
- [add-vincken-2026-wiki-and-cite-in-euclid](draft/docs/workspaces/add_vincken_2026_wiki_and_cite_in_euclid.md) — workspaces · small · safe · normal
- [`add_notebook_quotes` mistakes a code string literal's closing delimiter for a](draft/bug/hands/notebook_quotes_string_literal_closing_delimiter.md) — hands · small · safe · low
Expand Down Expand Up @@ -80,7 +79,7 @@ Scoped but not started; some are not yet prompt files. Full detail in [`planned.

## Backlog

**129** filed prompts, not started. Each section is sorted most-pickable first (priority, then size).
**128** filed prompts, not started. Each section is sorted most-pickable first (priority, then size).

<details>
<summary><b>bug</b> — 35</summary>
Expand Down Expand Up @@ -156,31 +155,6 @@ Scoped but not started; some are not yet prompt files. Full detail in [`planned.

</details>

<details>
<summary><b>maintenance</b> — 19</summary>

- [autolens_workspace_developer rectangular experiments — Gut stash + rename](draft/maintenance/autolens_workspace_developer/rectangular_experiments_gut_stash.md) — autolens_workspace_developer · small · supervised · normal
- [PyAutoFit CLI-noise batch: unclosed search.log handler + four small warning](draft/maintenance/pyautofit/cli_noise_pyautofit_batch.md) — pyautofit · small · safe · normal
- [Mirror drifted library config keys into the workspace configs](draft/maintenance/workspaces/config_key_mirror_drift.md) — workspaces · small · supervised · normal
- [Un-park imaging/features/scaling_relation/slam once PyAutoArray#431 merges](draft/maintenance/workspaces/unpark_imaging_scaling_relation_slam.md) — workspaces · small · supervised · normal
- [autolens_workspace_developer: broad stale-API rot (56 symbols, no CI)](draft/maintenance/autolens_workspace_developer/stale_api_rot_audit.md) — autolens_workspace_developer · medium · supervised · normal
- [run_smoke.py: three runner variants across 10 repos, no sync mechanism](draft/maintenance/ci/run_smoke_copy_drift.md) — ci · medium · supervised · normal
- [Dependency-cap refresh 2026-08: safe bumps, astropy 8 decision, two dead](draft/maintenance/libraries/dep_cap_refresh_2026_08.md) — libraries · medium · supervised · normal
- [PyAutoMemory canonical-key TODO sweep](draft/maintenance/pyautomemory/canonical_key_todo_sweep.md) — pyautomemory · medium · supervised · normal
- [Single-source the "Never rewrite history" policy as a generated AGENTS.md](draft/maintenance/pyautomind/history_policy_generated_block.md) — pyautomind · medium · supervised · normal
- [Capped smoke datasets were committed as if they were real](draft/maintenance/workspaces/committed_capped_smoke_datasets.md) — workspaces · medium · supervised · normal
- [autolens_profiling is now a mature project, with a good separation](draft/maintenance/autolens_profiling/polish.md) — autolens_profiling · large · supervised · normal
- [Auto-request GitHub Copilot code review on every PR, org-wide](draft/maintenance/ci/copilot_auto_review.md) — ci · large · supervised · normal
- [autolens_workspace](draft/maintenance/workspaces/read_through_issues.md) — workspaces · too-large · supervised · normal
- [dataset/imaging/jwst_lw is untracked because the gitignore was never extended for](draft/maintenance/autolens_profiling/jwst_lw_untracked_gitignore_gap.md) — autolens_profiling · small · supervised · low
- [cosmos_web_ring stores boolean masks as float64, wasting ~3.4 MB of](draft/maintenance/autolens_workspace/cosmos_web_ring_mask_dtype.md) — autolens_workspace · small · supervised · low
- [LaTeX in non-raw docstrings emits SyntaxWarning: invalid escape sequence](draft/maintenance/autolens_workspace/latex_docstrings_invalid_escape_warnings.md) — autolens_workspace · small · supervised · low
- [Raw-string the LaTeX docstrings emitting SyntaxWarnings (HowToFit + HowToLens)](draft/maintenance/workspaces/latex_raw_string_docstrings.md) — workspaces · small · safe · low
- [Regenerate setup_notebook-drifted notebooks in autogalaxy/autofit/HowToFit workspaces](draft/maintenance/workspaces/notebook_setup_notebook_drift_siblings.md) — workspaces · small · supervised · low
- [Refresh the stale `.script_sizes.json` snapshot in @autolens_workspace](draft/maintenance/workspaces/script_sizes_snapshot_drift.md) — workspaces · small · safe · low

</details>

<details>
<summary><b>research</b> — 19</summary>

Expand All @@ -206,6 +180,30 @@ Scoped but not started; some are not yet prompt files. Full detail in [`planned.

</details>

<details>
<summary><b>maintenance</b> — 18</summary>

- [autolens_workspace_developer rectangular experiments — Gut stash + rename](draft/maintenance/autolens_workspace_developer/rectangular_experiments_gut_stash.md) — autolens_workspace_developer · small · supervised · normal
- [Mirror drifted library config keys into the workspace configs](draft/maintenance/workspaces/config_key_mirror_drift.md) — workspaces · small · supervised · normal
- [Un-park imaging/features/scaling_relation/slam once PyAutoArray#431 merges](draft/maintenance/workspaces/unpark_imaging_scaling_relation_slam.md) — workspaces · small · supervised · normal
- [autolens_workspace_developer: broad stale-API rot (56 symbols, no CI)](draft/maintenance/autolens_workspace_developer/stale_api_rot_audit.md) — autolens_workspace_developer · medium · supervised · normal
- [run_smoke.py: three runner variants across 10 repos, no sync mechanism](draft/maintenance/ci/run_smoke_copy_drift.md) — ci · medium · supervised · normal
- [Dependency-cap refresh 2026-08: safe bumps, astropy 8 decision, two dead](draft/maintenance/libraries/dep_cap_refresh_2026_08.md) — libraries · medium · supervised · normal
- [PyAutoMemory canonical-key TODO sweep](draft/maintenance/pyautomemory/canonical_key_todo_sweep.md) — pyautomemory · medium · supervised · normal
- [Single-source the "Never rewrite history" policy as a generated AGENTS.md](draft/maintenance/pyautomind/history_policy_generated_block.md) — pyautomind · medium · supervised · normal
- [Capped smoke datasets were committed as if they were real](draft/maintenance/workspaces/committed_capped_smoke_datasets.md) — workspaces · medium · supervised · normal
- [autolens_profiling is now a mature project, with a good separation](draft/maintenance/autolens_profiling/polish.md) — autolens_profiling · large · supervised · normal
- [Auto-request GitHub Copilot code review on every PR, org-wide](draft/maintenance/ci/copilot_auto_review.md) — ci · large · supervised · normal
- [autolens_workspace](draft/maintenance/workspaces/read_through_issues.md) — workspaces · too-large · supervised · normal
- [dataset/imaging/jwst_lw is untracked because the gitignore was never extended for](draft/maintenance/autolens_profiling/jwst_lw_untracked_gitignore_gap.md) — autolens_profiling · small · supervised · low
- [cosmos_web_ring stores boolean masks as float64, wasting ~3.4 MB of](draft/maintenance/autolens_workspace/cosmos_web_ring_mask_dtype.md) — autolens_workspace · small · supervised · low
- [LaTeX in non-raw docstrings emits SyntaxWarning: invalid escape sequence](draft/maintenance/autolens_workspace/latex_docstrings_invalid_escape_warnings.md) — autolens_workspace · small · supervised · low
- [Raw-string the LaTeX docstrings emitting SyntaxWarnings (HowToFit + HowToLens)](draft/maintenance/workspaces/latex_raw_string_docstrings.md) — workspaces · small · safe · low
- [Regenerate setup_notebook-drifted notebooks in autogalaxy/autofit/HowToFit workspaces](draft/maintenance/workspaces/notebook_setup_notebook_drift_siblings.md) — workspaces · small · supervised · low
- [Refresh the stale `.script_sizes.json` snapshot in @autolens_workspace](draft/maintenance/workspaces/script_sizes_snapshot_drift.md) — workspaces · small · safe · low

</details>

<details>
<summary><b>docs</b> — 17</summary>

Expand Down
35 changes: 0 additions & 35 deletions draft/maintenance/pyautofit/cli_noise_pyautofit_batch.md

This file was deleted.

Loading