Repository navigation
refactor: drop output metadata file; aggregator keys on files/search.json - #1585
Merged
Merged
Conversation
…json `DirectoryPaths.save_all` no longer writes the two-line `metadata` file into each search output folder. `Aggregator.from_directory` discovers a search output when `files/search.json` exists (written unconditionally by the same `save_all`), keeping legacy `metadata`-only folders discoverable. `SearchOutput.non_linear_search` becomes a property read from `search.json` so existing filters keep their values; `.text` / `.file_path` are removed. Resume keys on `.completed` and is unaffected. Closes #1582 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GkELVxsdpNKyegTu4bFJTR
1 task done
Collaborator
Author
|
Workspace PR: PyAutoLabs/autofit_workspace_test#101 |
1 task done
Collaborator
Author
|
Workspace PR: PyAutoLabs/autolens_workspace_developer#133 |
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
Every
DirectoryPaths.save_allwrote a two-linemetadatafile (name=…,non_linear_search=…) into each search output folder, in append mode. Its only load-bearing consumer wasAggregator.from_directory, which used the file's presence as the sentinel that a walked directory is a search output.files/search.jsonis written unconditionally by the samesave_all(including the skip-fit-output branch), so discovery now keys on that instead and themetadatafile is no longer written. Legacy output folders and archived zips that still carrymetadatacontinue to aggregate. Resume is keyed on.completedand is untouched, so in-flight runs are unaffected.Closes #1582.
API Changes
metadatafile.Aggregator.from_directorydiscovers a search output when<dir>/files/search.jsonexists (legacymetadata-only folders still discovered).SearchOutput.non_linear_searchis now a property read fromfiles/search.json(class_pathleaf, lower-cased), soagg.query(agg.non_linear_search == "emcee")keeps working with the same values; legacy folders fall back to themetadataline.SearchOutput.textandSearchOutput.file_pathremoved;str()/repr()now report the output directory.See full details below.
Test Plan
pytest test_autofit/aggregator test_autofit/non_linear/paths— 95 passedpytest test_autofit— 2477 passed, 2 skippedaf.LBFGSfit writes nometadata;Aggregator.from_directoryreturns the identifier directory (notfiles/), extracts the search zip, andagg.query(agg.non_linear_search == "lbfgs")matchesfiles/search.jsonsentinel,files/withoutsearch.jsonnot discovered, legacymetadatafolder still discovered,non_linear_searchfromsearch.jsonprofiling/aggregatormocks and autolens_workspace_developeraggregator_profilingmocks stop appendingmetadata, harness keys onunique_tagFull API Changes (for automation & release notes)
Removed
DirectoryPaths._save_metadata— themetadataoutput file is no longer written.SearchOutput.file_path,SearchOutput.text— the parsedmetadatacontents; attributes previously spliced from that file into the instance (name,non_linear_search, and anything a user appended by hand) are no longer injected.Added
SearchOutput.non_linear_search(property) — lower-cased search class name fromfiles/search.json;Noneif neithersearch.jsonnor a legacymetadataline is present.autofit.aggregator.aggregator._is_search_output(root, dirs, filenames)— the directory-walk sentinel (private).Migration
metadatafile;agg.non_linear_search == "emcee"read it.files/search.json(always written bysave_all);agg.non_linear_search == "emcee"readssearch.json. No user code change needed. Custom keys appended tometadataby hand-rolled scripts are no longer surfaced as attributes; useunique_tag(or a field ininfo.json) instead.Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GkELVxsdpNKyegTu4bFJTR