fix(treesearch): prevent search.py from moving static datasets#50
Open
Oversear13 wants to merge 1 commit into
Open
fix(treesearch): prevent search.py from moving static datasets#50Oversear13 wants to merge 1 commit into
Oversear13 wants to merge 1 commit into
Conversation
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
Introduces an extension-based blacklist filter in search.py to prevent static datasets from being destructively moved to node checkpoints during tree-search iterations, significantly reducing disk-space overhead and pipeline crashes.
Problem
In the current state of AutoRecLab, the exec_node method indiscriminately collects all files within the workspace and uses shutil.move() to transfer them into the current node's checkpoint directory. This catches agent-generated artifacts (like plots or results), but datasets (e.g., u.data, .csv, .zip files) as well.
This automated moving behavior causes severe architectural issues:
Pipeline Disruption (FileNotFoundError): Once a dataset is moved to a checkpoint during the first iteration, it is missing from the workspace root in subsequent iterations, causing follow-up runs to crash.
Massive Memory Overhead: If users rely on automated loaders to bypass the missing files, the framework forces redownloads and recanonicalizations for every single node, duplicating gigabytes of data across countless hash-named checkpoint folders and triggering No space left on device errors eventually.
Dirty Git Tree: Moving local files constantly flags the datasets as "deleted" or "untracked" in the user's repository state.
Solution
We modified the file aggregation phase in search.py by introducing a robust extension-based filter (ignored_extensions).
Input vs. Output Separation: The framework now explicitly ignores typical dataset formats (.csv, .data, .tsv, .zip, .gz) when collecting files from both the workspace root and the working/ subdirectory.
Non-Destructive Execution: Static inputs safely persist in the workspace across all iterations, allowing the user to copy datasets once into the directory without them being wiped out.
Storage Optimization: Only true agent-generated artifacts (such as evaluation summaries or logs) are moved to the checkpoint folder, keeping the disk usage minimal and the Git tree clean.