Skip to content

Allow user to pass steps to resume command#148

Open
aliroberts wants to merge 1 commit intodevfrom
feat/resume-completed
Open

Allow user to pass steps to resume command#148
aliroberts wants to merge 1 commit intodevfrom
feat/resume-completed

Conversation

@aliroberts
Copy link
Copy Markdown
Contributor

Summary

  • New -n, --steps N flag on weco resume. Runs N more evaluations from the last node by resetting the backend run's budget to `last_step
  • N`.
  • weco resume now accepts runs in the completed status when --steps is provided (previously only error / terminated were
    resumable).
  • The resume confirmation prompt now shows the budget delta when --steps is set, and warns in yellow when the value would shrink the original budget.
  • The progress UI picks up the new total from the resume response so the bar reflects the bumped target instead of the stale original.
  • Omitting --steps keeps existing behavior 1:1 — weco resume <id> on a terminated/errored run still resumes to the original budget.

Files

  • weco/cli.py — adds -n/--steps to configure_resume_parser; execute_resume_command threads it as additional_steps into resume_optimization.

    • weco/optimizer.pyresume_optimization accepts additional_steps; loosens the status gate to allow completed when set; passes steps through to the backend; refreshes total_steps from the resume response; new confirmation block with budget delta + shrink warning.
    • weco/api.pyresume_optimization_run forwards steps.
    • weco/core/api.pyWecoClient.resume_run accepts and forwards steps in the POST body.

    Semantics

    --steps N always means "N more evaluations from the last node" — uniform across error, terminated, and completed. The new budget is last_step + N, which can be smaller than the original run.steps for terminated runs (the confirmation prompt warns in this case). Pydantic enforces N >= 1 server-side.

This intentionally diverges from weco run and weco run derive, where --steps is the total budget for a fresh run. For resume, "more from here" matched user expectations better.

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.

1 participant