Skip to content

Add --min-runtime to protect Beaker evals from preemption - #408

Merged
gregorybchris merged 3 commits into
mainfrom
chrisg/beaker-min-runtime
Sep 25, 2026
Merged

gregorybchris merged 3 commits into
mainfrom
chrisg/beaker-min-runtime

Conversation

@gregorybchris

@gregorybchris gregorybchris commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Adds --min-runtime to olmo-eval beaker launch, so an eval can be protected from preemption.

uv run olmo-eval beaker launch -m llama3.1-8b -t mmlu -c h100 --min-runtime 4h

The same setting is available as min_runtime: 4h in a launch config file, or as BeakerJobConfig(min_runtime="4h") in the Python API.

Why

Beaker has deprecated preemptible and replaced it with a per-task minRuntime. Until now, the only way to get protection in olmo-eval was --no-preemptible. Beaker turns that into an 8h min runtime with auto-resume off. --min-runtime lets you choose the value and keeps auto-resume on.

What Beaker does with it

  • How long protection lasts depends on the cluster. On clusters whose scheduling policy makes jobs interruptible after their min runtime, the job is protected for that long, then can be preempted and is requeued. On other clusters, any min runtime protects the job for its whole run.
  • Accepted range: Beaker accepts 5m to 8h at experiment creation, and no more than the cluster's max task timeout.
  • Allocations: clusters that require an allocation for protected work reject a min runtime unless the workspace has one there.

Behavior in olmo-eval

  • --min-runtime sends minRuntime with no preemptible field. Beaker rejects specs that contain both.
  • Accepted values: positive durations in h/m/s units, such as 2h, 30m, or 1h30m. Zero is rejected, because Beaker treats it as fully preemptible.
  • Conflicts: setting preemptible and min_runtime together is an error, in the CLI and in a config file.
  • Precedence: if the CLI sets --min-runtime or --preemptible/--no-preemptible, the CLI value replaces both fields from the config file.
  • Default: unchanged. Jobs without either setting still send preemptible: true.
  • External evals (-E): accept the CLI flag. As before, they do not read the config file.
  • Dependencies: raises the minimums to beaker-gantry>=3.7.0 and beaker-py>=2.6.0, the first releases that accept min_runtime. The lockfile already pins these versions.

Testing

  • Unit tests cover:

    • validation, including rejecting zero
    • CLI and config file precedence and conflicts
    • forwarding from both job assemblers
    • the arguments passed to gantry
    • the serialized Beaker task context
    • both dry-run headers
  • uv run pytest tests/ --ignore=tests/integration passes. ruff and ty report nothing new.

  • A gantry dry run with min_runtime="2h" builds a task context of {'priority': 'normal', 'minRuntime': 7200000000000}.

  • A real launch from this branch succeeded: 01M3B0JMJJ7YGT41GB2Q1WCZ0G, commit fdfebd4.

    uv run olmo-eval beaker launch -m olmo-2-7b -t arc_easy -o limit=20 -c h100 -G 1 \
        --min-runtime 30m -T 1h -w ai2/olmo-eval-debug -B ai2/oe-other
    • Beaker accepted the spec and stored it as minRuntime: 30m0s with autoResume: true. There is no preemptible field.
    • The job ran on ai2/ceres for 11 minutes and exited 0. All 20 instances completed, with accuracy:logprob of 0.70.

🤖 Generated with Claude Code

gregorybchris and others added 2 commits September 24, 2026 17:31
Beaker deprecated the preemptible flag in favor of a per-task min runtime.
`olmo-eval beaker launch --min-runtime 2h` (or `min_runtime: 2h` in a
config file) now sets the task's minRuntime, so the job cannot be
preempted for its first 2h and keeps auto-resume on.

The CLI and config file each supply one preemption setting: when the CLI
sets --min-runtime or --preemptible/--no-preemptible, it replaces both
config file fields. Setting preemptible and min_runtime in the same source
is an error. Raises the beaker-gantry floor to 3.7.0 and beaker-py to
2.6.0, the first versions that accept min_runtime.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- README: protection lasts only for the min runtime on clusters whose
  policy makes jobs interruptible after it; elsewhere any min runtime
  protects the whole run. Beaker enforces a fixed 5m-8h range plus the
  cluster's max task timeout, not a per-cluster range.
- Reject a zero min runtime, which Beaker treats as fully preemptible.
- Default EvalConfig.preemptible to None so an explicit
  `preemptible: true` alongside `min_runtime` in a config file is
  rejected like the CLI combination.
- Show min runtime as h/m/s in print_experiment_config, matching the
  dry-run header, and mark --preemptible deprecated in its help text.
- Test the serialized task context and both header printers.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@fabrahman
fabrahman self-requested a review September 25, 2026 19:21

@fabrahman fabrahman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks all good. Thanks

@gregorybchris
gregorybchris enabled auto-merge (squash) September 25, 2026 19:50
@gregorybchris
gregorybchris merged commit 0131141 into main Sep 25, 2026
8 checks passed
@gregorybchris
gregorybchris deleted the chrisg/beaker-min-runtime branch September 25, 2026 19:57
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.

2 participants