Skip to content

CLI -o sampling_params.* override corrupts TaskConfig and crashes every worker #397

Closed

Description

@abhishekraok

Claude Opus 5 (Claude Code) · agent-written from Abhishek's comparator-grid runs, 2026-09-21

-o sampling_params.max_tokens=N is accepted by the CLI and then crashes every inference worker about two minutes into the job.

What happens

task_config_fields() (src/olmo_eval/cli/utils.py:120) advertises every TaskConfig field as a valid -o target, sampling_params included. _get_task_configs (src/olmo_eval/cli/beaker/launch.py:733-741) then does:

task_dict = task_cfg.to_dict()
task_dict = _apply_dotlist_overrides(task_dict, cli_overrides)
for key, value in task_dict.items():
    if hasattr(task_cfg, key):
        setattr(task_cfg, key, value)

to_dict() flattens SamplingParams to a plain dict, and nothing hydrates it back, so config.sampling_params ends up a dict. The job launches, the provider comes up, and the workers die on the first batch:

RuntimeError: Worker process crashed with 1039 inference result(s) pending
  (...): Worker process crashed: unhashable type: 'dict'

Repro

olmo-eval beaker launch -H default -o provider.kind=vllm \
  -m <any model> -t ifeval -o sampling_params.max_tokens=32768 \
  -c h100 --gpus 1

Four experiments died this way before I found it; the failure is ~2 min in, after GPU acquisition.

Why it matters now

hillclimb-evals-split-policy (#378) §2 asks for a 32K generation cap on omega_500 and livecodebench, both of which default to max_tokens=None (generate to the context limit). On a 262K-context model that default is not viable, and this override is the documented way to set the cap.

Workaround in use: cap at the provider instead, -o provider.kwargs.max_model_len=36864. That works because the vLLM provider passes max_tokens=None straight through and vLLM reads it as "generate to the context limit" (src/olmo_eval/inference/providers/vllm.py:227). It is not equivalent — the effective generation budget is max_model_len minus the prompt, so it varies per instance.

Suggested fix

Either hydrate nested dataclass fields after _apply_dotlist_overrides (SamplingParams(**value) when the target field is one), or drop sampling_params from task_config_fields() so the CLI rejects it up front instead of failing on GPU.

Activity

  1. abhishekraok commented on Sep 22, 2026

    @abhishekraok
    CollaboratorAuthor

    Claude Code · https://claude.ai/code/session_01CDvuvCSNCR1Ju9bLyK8oCS

    Workaround: use the flat key. -t ifeval_ood -o max_tokens=32768 works today. The nested form breaks because AsyncEvalRunner._build_task_overrides routes overrides by top-level key: sampling_params is a TaskConfig field, so {"sampling_params": {...}} goes into task_overrides and replace(task.config, sampling_params=<dict>) sets the raw dict. Flat max_tokens is a SamplingParams field, lands in sampling_overrides, and is merged properly in prepare_task_items. cli/utils.py already accepts flat sampling fields after -t.

    This matters beyond the crash: with no working per-task budget, the only lever left is provider.kwargs.max_model_len. That's what I used, and it truncated 19–37% of Qwen3.5 responses on IFEval/GPQA. It can't touch ifeval_ood's hard-coded max_tokens=2048 either.

    Fix, either:

    1. in _build_task_overrides, when key == "sampling_params" and the value is a dict, merge it into sampling_overrides; or
    2. drop sampling_params from task_config_fields() so the CLI rejects the nested form with the existing "not a TaskConfig or SamplingParams field" message.

    (1) keeps both spellings working. _get_task_configs in cli/beaker/launch.py has the same round-trip, but only for the launch summary: overrides reach the job as strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions