Repository navigation
feat: results index, result states, dataset_identity.json and latest_per (results-library p1a) - #1743
Merged
Merged
Conversation
…per (results-library p1, PR 1a)
- ResultState (completed, running, interrupted_valid_ckpt, corrupt_ckpt,
corrupt_zip, failed, superseded, never_started) in the shared status
vocabulary.
- autofit/results: ResultsIndex (per-result JSON records as truth,
incremental on a stat fingerprint, --index-dir for read-only trees,
superseded siblings), classify(), ResultsCache (local SQLite, rebuilt from
the records), python -m autofit.results {index,status,count}.
- dataset_identity.json at fit start via Analysis.dataset_identity(): object
id, external ids, inputs with size + SHA256, centre, library versions;
general.output.dataset_identity(_sha256) switches.
- Aggregator.latest_per and SearchOutput.completed_at (status record or the
zip's .completed member, never zip mtime).
Refs #1739
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ndex) Witness W1 over the DR1 laptop mirror classified a healthy zip as corrupt_zip after a transient ENOMEM over /mnt/c. Only BadZipFile, EOFError and zlib.error mean a damaged archive; an OSError is retried once, then the result is counted as unreadable and keeps its previous record. Refs #1739 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #1739 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…udget Refs #1739 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Full PyAutoFit suite (PyAuto313, local) on 1a and 1b: 4,010 / 4,015 passed, the one failure was the 600-line decomposition guard on |
2 tasks done
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
PR 1a of results-library phase 1 (#1739, epic ledger
draft/feature/autofit/results_library_epic.md). PyAutoFit can now list, classify and count every result under any number of output folders, with no hand tooling.ResultStatejoins the shared status vocabulary (non_linear/status/states.py):completed, running, interrupted_valid_ckpt, corrupt_ckpt, corrupt_zip, failed, superseded, never_started.Results index (
autofit/results/), per ruling F2:ResultsCache) is rebuilt from those records on demand;--index-dirkeeps read-only trees untouched.Classification: the status record is read first; otherwise the zip or folder decides (
.completedplus a CRC check), and otherwise the checkpoint probe from phase 0. Arunningstatus record that hasn't been written for 10 minutes is not trusted.Unreadable is not corrupt: a transient I/O error is retried, then counted as unreadable and the previous record is kept. Witness W1 found this case (see below).
superseded: within one (path_prefix, unique_tag, name), every completed result except the newest bycompleted_at.dataset_identity.jsonat fit start (ruling F10), through a newAnalysis.dataset_identity()hook. It records:object_id(default:unique_tag) and external ids;A resumed fit whose inputs changed logs a warning. Config switches:
output.dataset_identityandoutput.dataset_identity_sha256.Aggregator.latest_per(key, by="completed_at")andSearchOutput.completed_at: taken from the status record or the zip's.completedmember, never the zip's mtime.CLI:
python -m autofit.results {index,status,count}.Decisions taken (please check)
latest_perdefault key is("path_prefix", "unique_tag", "name"), not the ledger's("unique_tag", "name"). In the Euclid DR1 layout every tile sharesunique_tag="initial_lens_model"and the object is inpath_prefix, so the ledger key would collapse all tiles into one group. The 3-field key handles both layouts.never_startedalso covers an output folder with no checkpoint and no status record, since a rerun of it starts from scratch. Phase 2 adds "expected but absent".dataset_identity.json, because fit outputs don't record them anywhere else today.Test plan
test_autofit/results: every state class; a CRC failure; a moved result; nested layouts; incremental re-index (only new results opened); removal; superseded and restore; read-only--index-dir; SQLite cache; CLI; I/O error counted as unreadable; identity from real Drawer fits (sha256, default, off switch, missing input);latest_peron real fits.Workspace/Science/scratch/results_library_p1_w1/README.md. The mirror is partial; the full census is the phase-5 witness.Follow-up (not here): a PyAutoArray/PyAutoLens
dataset_identity()that fills real input paths and the cutout centre.Refs #1739
🤖 Generated with Claude Code