Repository navigation
feat: results library phase 3 — incremental honest exports + chunk/merge - #1755
Merged
Merged
Conversation
- AggregateCSV.save(cache=, shard=, expected=, sort_by=, on_error=, columns_json=): row cache <csv>.rows.jsonl (row_fingerprint + column-spec digest incl. closures, defaults and helper functions; rows stored as CSV text so cached == fresh); header built from the columns (same for every shard); error rows and expected-result rows with status_reason; dataset/search columns - <name>.columns.json sidecar (source, kind, statistic, bound, unit, n_blank) - add_variable(unit=, prior_edge=) — prior-edge flag (log space for log priors) - merge_csv / af.merge_csv / `python -m autofit.results merge`: header agreement, key dedup, deterministic sort; 4-shard merge == serial export - SearchOutput.plain(name) + plain(): typed autonerves JSON → plain Python - AggregateFITS.output_to_folder: atomic writes, skip_errors Refs #1754 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from
feature/results-library-p2-completeness
to
main
November 2, 2026 12:16
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
Results-library phase 3 (closes #1754; epic ledger PyAutoMind
draft/feature/autofit/results_library_epic.md). Exports become incremental (a refresh reads only new or changed results) and honest: every result, and every expected result, gets a row or a reason, and acolumns.jsonsidecar describes each column. A scheduler-agnostic chunk/merge splits a big export across Slurm array tasks or a laptop process pool and merges it byte-identical to the serial export. This generalises the DR1 hand tooling (merge_catalogue.merge_csv,build_wcs_package.plain_from).Stacked on #1753 (phase 2): it reuses
autofit/results/shard.pyandCompletenessReport. The base isfeature/results-library-p2-completeness. Merge #1753 first, then retarget this PR tomain.API Changes
Additive.
AggregateCSV.save(path)with no new arguments keeps its columns, column order and no-sort behaviour.AggregateCSV.save(path, cache=False, shard=None, expected=None, sort_by=None, on_error="raise", columns_json=False).AggregateCSV.add_variable(..., unit=None, prior_edge=False).af.merge_csv(parts, path, key="id", sort_by=None)andpython -m autofit.results merge OUT PARTS....SearchOutput.plain(name): a typedfiles/<name>.jsonas plain Python.AggregateFITS.output_to_folder(..., skip_errors=False): atomic writes, returns the skipped results.See full details below.
Test Plan
test_exports.py: 21 tests, 10 of them regressions from the independent review. They cover:expected=, and merging a part twice;plain(), including compound-key dicts;PYTHONHASHSEEDvalues.skip_errorstest.plain()mishandled compound-key dicts;Workspace/Science/scratch/results_library_p3_w1c/):kill -9left the previous CSV and cache byte-identical;Full API Changes (for automation & release notes)
Added
autofit.aggregator.summary.aggregate_csv.cache:RowCache,cache_path,row_fingerprint,function_digest,spec_digestandcsv_text.autofit.aggregator.summary.aggregate_csv.merge:merge_csv,sort_rows,write_rowsandMergeException.merge_csvandMergeExceptionare re-exported fromaggregate_csv, andmerge_csvasaf.merge_csv.AggregateCSV.stats:computed,cached,errorsandexpectedfrom the last save.Column(..., unit=None, prior_edge=False), withColumn.fields(),Column.describe(field)andColumn.spec().ComputedColumnandLabelColumngainspecanddescribe.Row:reasons,latent_summary(the old_latent_summaryis kept as an alias),parameter_paths, anddict(columns=None).autofit.aggregator.search_output.plain(document)andSearchOutput.plain(name).AggregateFITS.output_to_folder(..., skip_errors=False), which returns a list of(search_output, exception).mergeinpython -m autofit.results.Changed
AggregateCSV.savewrites the CSV header from the column definitions rather than from the rows. With the default arguments the columns and their order are the same as before.str()(ascsvdoes), so an ndarray in a computed column no longer breaks the blank-column check.Migration
Decisions flagged:
sort_by(shards default toid).on_errordefaults to"raise", as before. Pass"row", orexpected=, to get rows with reasons.Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code