Repository navigation
Description
Overview
Running unit tests, integration tests, and workspace scripts produces noisy stderr/stdout from third-party libraries (JAX CUDA plugin warnings, SQLAlchemy relationship warnings), stray print() calls in library code, and verbose INFO-level logging. This clutters output and makes it hard to spot real problems. This task systematically finds and fixes these noise sources across all PyAuto repos, and creates a /cli_noise_clean skill to re-audit periodically.
Plan
- Add
filterwarningstopyproject.tomlin all 5 library repos to suppress known benign warnings (JAX CUDA, SQLAlchemy overlaps, numba caching) - Fix the root cause of SQLAlchemy relationship warnings in PyAutoFit's
Fitclass - Audit and convert stray
print()calls in library code tologging.debug()or remove - Set default logging level to WARNING for library loggers during test runs via conftest.py
- Run representative workspace scripts (simulators + modeling with TEST_MODE=2) to catch JAX/runtime noise that only appears during real execution
- Add JAX-specific filters for compilation warnings, XLA backend messages, and numpy deprecation warnings triggered through JAX
- Create a
/cli_noise_cleanskill for periodic re-auditing
Detailed implementation plan
Affected Repositories
- PyAutoFit (primary)
- PyAutoConf
- PyAutoArray
- PyAutoGalaxy
- PyAutoLens
- autolens_workspace (scripts for noise audit)
- autogalaxy_workspace (scripts for noise audit)
Work Classification
Library (with workspace script auditing)
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| PyAutoConf | main | clean |
| PyAutoFit | main | clean |
| PyAutoArray | main | 2 modified |
| PyAutoGalaxy | main | clean |
| PyAutoLens | main | 1 modified |
Suggested branch: feature/cli-noise-clean
Worktree root: ~/Code/PyAutoLabs-wt/cli-noise-clean/
Implementation Steps
-
pytest filterwarnings — Add to
[tool.pytest.ini_options]in each repo'spyproject.toml:ignore::DeprecationWarning:jaxignore:cuda_plugin_extension:UserWarning:jax_pluginsignore:relationship.*will copy column:sqlalchemy.exc.SAWarning- Additional filters discovered during workspace script runs
-
Fix SQLAlchemy relationship overlaps —
PyAutoFit/autofit/database/model/fit.py(lines 330-344): addoverlapsparameter toarraysandhdusrelationships -
Audit print() statements — Scan library code for
print()producing test noise:PyAutoFit/autofit/non_linear/analysis/analysis.py(VRAM profiling)PyAutoFit/autofit/aggregator/aggregator.pyPyAutoArray/autoarray/mask/derivation files- Convert to
logger.debug()or remove if debug leftovers
-
Logging level in conftest.py — Add
logging.getLogger("autoarray").setLevel(logging.WARNING)etc. to rootconftest.pyin each repo -
Workspace script noise audit — Run with
PYAUTO_TEST_MODE=2 PYAUTO_WORKSPACE_SMALL_DATASETS=1:autolens_workspace/*/simulator.pyscriptsautolens_workspace/*/modeling.pyscriptsautogalaxy_workspaceequivalents- Capture stderr, parse for JAX compilation warnings, XLA messages, numpy deprecation warnings
-
JAX-specific filters — Based on modeling run output, add filters for JAX compilation warnings, XLA backend messages, numpy deprecation warnings via JAX's numpy shim
-
Create
/cli_noise_cleanskill — Skill with modes:/cli_noise_clean— full audit (pytest + workspace scripts)/cli_noise_clean pytest— pytest-only/cli_noise_clean scripts— workspace scripts only
Key Files
*/pyproject.toml— pytest warning filtersPyAutoFit/autofit/database/model/fit.py— SQLAlchemy relationship fix*/conftest.py— logging level configurationadmin_jammy/skills/cli_noise_clean/SKILL.md— new skill
Original Prompt
Click to expand starting prompt
When we run unit tests, integration tests, scripts and other things we get noise on the command
line due to libraries versions, badly formatted docstrings and other issues.
Can you do a full run through of different scripts over the projects, find this noise and gradually fix
the issues as they crop up.
Activity
Jammy2211 commentedon Apr 13, 2026
Shipped — 2026-04-13
PRs
Summary
Fixed all SyntaxWarning: invalid escape sequence warnings across PyAutoFit (4 files), PyAutoArray (8 files), and PyAutoGalaxy (8 files) by converting docstrings containing LaTeX math and ASCII art diagrams to raw strings. Added pytest filterwarnings to all 5 repos for JAX CUDA plugin warnings, JAX deprecation warnings, and SQLAlchemy relationship overlap warnings. Renamed a test class that triggered PytestCollectionWarning.
All 3083 unit tests pass. 23/28 smoke tests pass (5 failures are pre-existing dataset/aggregator issues unrelated to this change).
Session Notes
/cli_noise_cleanskill was also created for periodic re-auditing of CLI noise.