Repository navigation
refactor: auto-simulate datasets with al.util.dataset.simulate_if_needed - #612
Merged
Merged
Conversation
Replace the 8-line should_simulate + subprocess.run block with the one-line util.dataset.simulate_if_needed(dataset_path, simulator=...) helper (PyAutoArray#670): 253 blocks in 246 scripts. Mechanical rewrite: dataset and simulator paths kept exactly; a redundant str(...) around the path is dropped because the helper str()s it. Non-standard blocks are untouched. 246 notebooks regenerated with PyAutoHands generate.py autolens --assistant-root autolens_assistant; unrelated Colab-context refreshes and unicode-escaping noise from the generator were reverted, so each notebook diff is only this rewrite. check_dataset_allowlist reports the same guarded call-site count before and after. Requires the PyAutoArray release that carries #670. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016nhQ8NyQo2s3YUk8eUrrB3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of PyAutoLabs/autogalaxy_workspace#268 (phase 3 of PyAutoLabs/PyAutoArray#669).
Summary
Replaces the 8-line
should_simulate+subprocess.runauto-simulate block with the one-line helper in 246 scripts (253 blocks):str(...)around the path is dropped because the helper callsstr()itself. Behaviour is unchanged: the simulator still runs as asys.executablesubprocess withcheck=True.generate.py autolens --assistant-root <autolens_assistant>.Testing
scripts/check_sizes.shreports no shrinkage.check_dataset_allowlist: 256 guarded call sites before and 256 after; the leg-2 capped-deletion check passes over the 56 committed dataset files.main:imaging/fit.pyandimaging/modeling.pypassed, simulating their datasets through the helper.Not changed
These are non-standard, so they were left as they are:
scripts/group/features/multi_gaussian_expansion/simulator.py:55scripts/guides/mappings.py:145, which simulates inline.scripts/cluster/likelihood_function.py, which only mentionsshould_simulatein text.Merge mode: human
/prm, after the release.Generated by Claude Code