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
filterwarnings to pyproject.toml in 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
Fit class
- Audit and convert stray
print() calls in library code to logging.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_clean skill 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's pyproject.toml:
ignore::DeprecationWarning:jax
ignore:cuda_plugin_extension:UserWarning:jax_plugins
ignore: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): add overlaps parameter to arrays and hdus relationships
-
Audit print() statements — Scan library code for print() producing test noise:
PyAutoFit/autofit/non_linear/analysis/analysis.py (VRAM profiling)
PyAutoFit/autofit/aggregator/aggregator.py
PyAutoArray/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 root conftest.py in each repo
-
Workspace script noise audit — Run with PYAUTO_TEST_MODE=2 PYAUTO_WORKSPACE_SMALL_DATASETS=1:
autolens_workspace/*/simulator.py scripts
autolens_workspace/*/modeling.py scripts
autogalaxy_workspace equivalents
- 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_clean skill — 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 filters
PyAutoFit/autofit/database/model/fit.py — SQLAlchemy relationship fix
*/conftest.py — logging level configuration
admin_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.
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_cleanskill to re-audit periodically.Plan
filterwarningstopyproject.tomlin all 5 library repos to suppress known benign warnings (JAX CUDA, SQLAlchemy overlaps, numba caching)Fitclassprint()calls in library code tologging.debug()or remove/cli_noise_cleanskill for periodic re-auditingDetailed implementation plan
Affected Repositories
Work Classification
Library (with workspace script auditing)
Branch Survey
Suggested branch:
feature/cli-noise-cleanWorktree 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.SAWarningFix SQLAlchemy relationship overlaps —
PyAutoFit/autofit/database/model/fit.py(lines 330-344): addoverlapsparameter toarraysandhdusrelationshipsAudit 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 fileslogger.debug()or remove if debug leftoversLogging level in conftest.py — Add
logging.getLogger("autoarray").setLevel(logging.WARNING)etc. to rootconftest.pyin each repoWorkspace script noise audit — Run with
PYAUTO_TEST_MODE=2 PYAUTO_WORKSPACE_SMALL_DATASETS=1:autolens_workspace/*/simulator.pyscriptsautolens_workspace/*/modeling.pyscriptsautogalaxy_workspaceequivalentsJAX-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 onlyKey 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 skillOriginal 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.