Repository navigation
Stitched restart output retains only the original run's config #2520
AdemVessell
started this conversation in
Ideas
Replies: 1 comment 1 reply
|
Thank you for noticing this and for the very clear explanation and repro. I can confirm the repro. I think there are 2 things to do.
Are you able to sign the CLA? If so, then please go ahead and contribute the PR. If not, that's fine, and we can take it from here. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I noticed a small output-provenance gap while checking restart reproducibility. On
7fb2d811d2c605c5d9144e89a8b9ea3394962b90, a stitched restart retains the original file'sconfigattribute, with no saved configuration for the resumed segment.In a short circular-geometry run, I changed generic heating from 1 MW to 2 MW at the restart and extended
t_finalfrom 0.3 to 0.5 seconds. The stitched data contains the 2 MW continuation through 0.5 seconds, but its saved config still says 1 MW,t_final=0.3, andrestart=null. Withstitch=False, the new config is saved correctly. The stitched continuation's data matches the unstitched continuation.This appears to come from
concat_datatrees: xarray keeps the first dataset's attributes aftersimulation_output_to_xrhas populated the new config. The output documentation describes the saved config as usable for inspection or rerunning, so the limitation could surprise someone working only from the stitched file.Reproducer, run from an environment with the pinned TORAX source installed:
Observed output: stored
t_final/restart: 0.3 None; continuation power is 2,000,000 W at every new time. Tested on macOS arm64, Python 3.12.13, JAX 0.11.2 and xarray 2026.7.0. The three existing concat/config output tests also pass. This is a metadata observation, not evidence of incorrect numerical results.Would you prefer documenting this limitation first, or preserving the resumed config alongside the original in an agreed format? I can contribute a focused test and small change once that direction is clear.
I used Codex to help inspect the code, build the reproducer, and run these checks.
All reactions