fix(discard): preserve declared artifacts - #64
Open
anirudh5harma wants to merge 1 commit into
Open
anirudh5harma wants to merge 1 commit into
anirudh5harma wants to merge 1 commit into
Conversation
PredictiveManish
pushed a commit
to PredictiveManish/evo
that referenced
this pull request
Jun 28, 2026
Cherry-picked from anirudh5harma's evo-hq#64 onto the 0.5.0 line. Copies declared benchmark/trace artifacts out of a worktree-backed experiment before discard, writes a discard artifact manifest, and references the preserved artifacts from the discarded result — so eval-side failures don't destroy still-useful checkpoints (closes evo-hq#60). Conflict resolved against the 0.5.0 branch: kept the existing _capture_discard_time_diff call alongside the new preservation step; both run before delete_discarded_experiment wipes the worktree. (cherry picked from commit b111ec5)
PredictiveManish
pushed a commit
to PredictiveManish/evo
that referenced
this pull request
Jun 28, 2026
…aker
Category-agnostic asset/reuse/stop machinery (mechanism in core, knowledge
declared by skills — never finetuning-specific, no hardcoded final_model):
CLI (cli.py):
- `evo discard --failure-class {build,eval,hypothesis}` — records why a node
failed on the node + outcome, to route reuse vs branch.
- `evo new --from-artifact <exp[:label]>` — seed a new experiment from a
PRESERVED artifact of a prior (often discarded) experiment; resolves it from
the discard manifest and exposes the path to the recipe as EVO_SEED_ARTIFACT
(aliased to EVO_PARENT_POLICY for back-compat with existing recipes).
- `evo abort` now kills the driver AND its descendant subprocess tree (TODO evo-hq#7):
captures children before signalling the parent so a long benchmark/training
child can't orphan. killpg avoided (driver may share the caller's group).
- preserve-on-discard (evo-hq#64) now records already-persistent artifacts (e.g.
written to EVO_CHECKPOINT_DIR) as reusable in the manifest, not just skipped —
so they're seedable via --from-artifact.
- --from-artifact resolver dedups artifacts declared by multiple sources.
Docs/skills:
- cli-quick-reference: new "Artifacts & reuse" section; abort tree-kill;
discard --failure-class; new --from-artifact + EVO_SEED_ARTIFACT.
- subagent SKILL: generic declare-artifacts (write to EVO_CHECKPOINT_DIR + name
in result.artifacts), failure-class on discard, reuse, mid-run abort.
- finetuning SKILL/glue: reconcile the documented-but-never-set EVO_PARENT_POLICY
to the real EVO_SEED_ARTIFACT (+ alias); add a single-GPU device-placement
prior (no device_map="auto" for training); generalize away final_model.
Dry-run validated end-to-end on a throwaway workspace: eval-side failure ->
discard --failure-class eval (classified + checkpoint preserved) -> new
--from-artifact -> EVO_SEED_ARTIFACT reached the recipe; and abort mid-run took
down the driver + benchmark subprocess tree with the partial checkpoint kept.
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
Why
Discarding evaluated experiments removed the worktree wholesale, so checkpoints or logs declared by the benchmark could disappear even when the failure was eval-side and the produced artifact was still useful. Preserving declared artifacts keeps that expensive output available for follow-up retests.
Tests
uv run --with pytest --with-editable plugins/evo pytest tests/unit/test_lifecycle.py -quv run --with pytest --with-editable plugins/evo pytest tests/unit/ -qCloses #60