Skip to content

fix(discard): preserve declared artifacts - #64

Open
anirudh5harma wants to merge 1 commit into
evo-hq:mainfrom
anirudh5harma:fix/discard-preserve-artifacts
Open

anirudh5harma wants to merge 1 commit into
evo-hq:mainfrom
anirudh5harma:fix/discard-preserve-artifacts

Conversation

@anirudh5harma

Copy link
Copy Markdown
Contributor

Summary

  • copy declared benchmark and trace artifacts before discarding a worktree-backed experiment
  • write a discard artifact manifest under the experiment record and reference preserved artifacts from the discarded result
  • cover result-level and trace-level artifact preservation in lifecycle tests

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 -q
  • uv run --with pytest --with-editable plugins/evo pytest tests/unit/ -q

Closes #60

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discarded experiments lose trained weights, blocking eval-side retests

1 participant