Repository navigation
docs: explain the automatic compute setup and its printed lines (5F PR3) - #139
Merged
Merged
Conversation
tutorial_2_practicalities gains an Automatic Compute Setup section (opting in, the header + Setup/Parallel/Estimate lines, overrides, link to the workspace guide); tutorial_need_for_speed explains how the setup is chosen and shows al.estimate_runtime; tutorial_6 mentions the lazy sparse operator. Notebooks regenerated. Part of PyAutoLabs/autolens_workspace#688 (likelihood-lifecycle phase 5F). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Likelihood-lifecycle phase 5F, PR3 of 3 (PyAutoLabs/autolens_workspace#688). This adds a concise explanation of the automatic compute setup where HowToLens first discusses run times, and updates the speed tutorial.
Merge timing: like the workspace PRs, merge with or after the library release that carries the automatic setup (
setup="auto",al.estimate_runtime,al.Settings(lazy_sparse_operator=...)are merged but not yet on PyPI).Changes
chapter_2_lens_modeling/tutorial_2_practicalities.py: a new "Automatic Compute Setup" section after "Run Times". It shows the one-line "not set (auto would choose …)" message, how to opt in (setup="auto",number_of_cores="auto"), the real header with itsSetup:/Parallel:/Estimate:lines and what each means, overrides (setup_id orPYAUTO_SETUP), and a pointer to autolens_workspacescripts/guides/advanced/auto_setup.py. The tutorial's own code is unchanged.chapter_optional/tutorial_need_for_speed.py: the setup is chosen from measured profiling. JAX isn't always fastest; on a CPU, pixelized fits use numba with a sparse operator. The section also adds anal.estimate_runtime(...).line()example.chapter_3_pixelizations/tutorial_6_adaptive_reconstruction.py: two sentences onal.Settings(lazy_sparse_operator="auto")as the lazy alternative to callingapply_sparse_operator()yourself.workspace_index.jsonregenerated.Real lines quoted in tutorial 2 (8-core laptop, test mode):
Test Plan
pyauto-heart smoke howtolensagainst this branch: 41/41 PASS.pyauto-heart readiness --dev --repos HowToLens): GREEN.Notes:
analysis.print_vram_use(...)before the fit, and withsetup="auto"that currently raises a misleadingSetupException. This is filed asdraft/bug/autogalaxy/setup_auto_unresolved_before_fit_print_vram_use.md.estimate_runtimeexample passes a concrete setup_id.setup="auto"isn't accepted there yet; this is filed asdraft/feature/autolens/estimate_runtime_accept_auto.md.Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code