feat: Phase D1 replay split preservation and cartesian input-filtered case alignment - #62
Merged
Merged
Conversation
| evaluated_items = set(split_items[:trials] if trials is not None else split_items) | ||
| all_inputs = load_items(root / task.environment.inputs_path) | ||
| split_order = {item_id: idx for idx, item_id in enumerate(split_items)} | ||
| filtered_inputs = [item for item in all_inputs if str(item["id"]) in set(split_items)] |
There was a problem hiding this comment.
[P2] Avoid rebuilding the split-item set per input
filtered_inputs = [item for item in all_inputs if str(item["id"]) in set(split_items)] rebuilds set(split_items) for every input item, which can turn this into O(len(all_inputs)*len(split_items)) work and add avoidable allocations on large datasets; compute the set once and reuse it.
Suggested change
| filtered_inputs = [item for item in all_inputs if str(item["id"]) in set(split_items)] | |
| split_set = set(split_items) | |
| filtered_inputs = [item for item in all_inputs if str(item["id"]) in split_set] |
…xecution, and assert pair result split/order
…ce canonical stage_split
Contributor
Author
|
@droid review |
…to partitioned tasks, and test refusal
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.
What: Passes canonical split into replay_job; filters cartesian independent cases by actual evaluated input items and declared split order; ensures runner and cartesian case counts remain in lockstep.
Why: Prevent replay head mismatches on non-default splits and ensure cartesian independent case counting exactly reflects evaluated inputs rather than full split inventory.
Verify: Full test suite green (1569 passed, 10 skipped); new tests in tests/test_split_manifest.py; ruff + format + mypy strict clean.