Commit fd7d866
fix: restore lost setup scaffolding in chapter 2 tutorial_2_practicalities
The imports, dataset load, mask and model setup were accidentally deleted
from this tutorial. Git history pinpoints the cause: the autolens_workspace
commit ce1bf623 "Add __Contents__ sections to all scripts" overwrote the
region spanning the old Contents list down through the __Search__ prose,
collaterally removing ~119 lines of setup code. The file dropped 421 -> 302
lines there. The later HowToLens bootstrap (62a5f3a) faithfully copied the
already-broken file, so the first runnable line was `search = af.Nautilus(...)`
referencing undefined `dataset_name`, `dataset` and `model`.
This restores the verbatim scaffolding from the last-complete version
(autolens_workspace 241cc8c0): imports, __PyAutoFit__, __Initial Setup__
(with auto-simulation), __Mask__ and __Model__. The dataset is
`simple__no_lens_light__mass_sis` (IsothermalSph mass + linear
ExponentialCoreSph source), the same fit as tutorial_1, matching the
tutorial's own prose ("the same dataset we fitted in the previous tutorial").
Modernized to current-repo conventions: setup_notebook header,
`scripts/simulator/...` subprocess path, and the PyAutoLabs/PyAutoFit URL.
Verified runnable end-to-end in fast mode
(PYAUTO_TEST_MODE=2 + skip flags): model composes (6 free params), dataset
loads, search and likelihood evaluation complete (exit 0).
Scanned both HowTo repos and the source commit's deletion footprint:
tutorial_2 was the only tutorial damaged this way; all other candidates were
verified false positives.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 0e4209e commit fd7d866
1 file changed
Lines changed: 98 additions & 0 deletions
Lines changed: 98 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
77 | 175 | | |
78 | 176 | | |
79 | 177 | | |
| |||
0 commit comments