Repository navigation
feat: read zipped results in place — ZipMember, from_zip, value(kind=), Aggregator.from_index (results-library p1b) - #1744
Merged
Conversation
…, value(kind=), Aggregator.from_index (results-library p1, PR 1b)
- ZipMember: a pathlib-like path into a result zip that holds no open file
(each open reopens the zip), so thousands of zipped outputs never hit the
open-file limit; member names cached per (size, mtime).
- FileOutput / SearchOutput read through path.open(), so a SearchOutput can
be backed by a zip (SearchOutput.from_zip) with nothing extracted; FITS
members load from memory.
- SearchOutput.open_member(path) public; value(name, kind=...) chooses
between files sharing a name (tracer.json vs tracer.fits) and warns once
when a bare name is ambiguous (order unchanged: json, pickle, csv, fits).
- Aggregator.from_index(roots, index_dir, states=('completed',)) aggregates
over the results index, superseded results left out by default.
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 |
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 1b of results-library phase 1 (#1739). Stacked on #1743; merge that first.
Zipped results are now read in place, with nothing extracted to disk:
ZipMember(aggregator/zip_member.py): a pathlib-like path into a zip. Unlikezipfile.Pathit holds no open file: eachopenreopens the zip, and zipfile keeps the stream valid after theZipFilecloses. Aggregating thousands of zips therefore never hits the open-file limit. Member names are cached per (size, mtime).FileOutput/SearchOutputread throughpath.open(), soSearchOutput.from_zip(zip_path)works unchanged; FITS members load from memory.SearchOutput.open_member(path)is public.value(name, kind=...)(report P15) picks betweentracer.jsonandtracer.fits. A bare ambiguous name keeps today's order (json, pickle, csv, fits) and warns once, so existing scripts behave the same.Aggregator.from_index(roots, index_dir=None, states=("completed",))aggregates over the results index and leaves superseded results out by default.Test plan
ZipMemberpath semantics; a zipped fixture reads the same as the folder fixture (id, model, search, children, json/fits values);open_member;value(kind=)and the ambiguity warning;from_indexon real fits withextractall/extractpatched to raise and the tree byte-identical afterwards.Refs #1739
🤖 Generated with Claude Code