Skip to content

prime train: --cluster flag overrides config cluster_name#717

Open
JannikSt wants to merge 1 commit into
mainfrom
improvement/cluster-flag
Open

prime train: --cluster flag overrides config cluster_name#717
JannikSt wants to merge 1 commit into
mainfrom
improvement/cluster-flag

Conversation

@JannikSt
Copy link
Copy Markdown
Member

@JannikSt JannikSt commented Jun 4, 2026

Adds a --cluster <name> flag to prime train <config> so users can retarget a single dispatch without editing the TOML. The flag wins over cluster_name in the config and forwards to the backend payload — the server returns a clear 400 if the cluster is unknown or out of capacity.

  • New flag piped through to RLClient.create_run
  • Works for the legacy prime rl run alias too (shared entrypoint)

Note

Low Risk
CLI-only override of an existing dispatch field; cluster enforcement remains on the backend with no new client-side validation logic.

Overview
Adds --cluster <name> to prime train <config.toml> so a single launch can pin dispatch to a named cluster without editing the TOML. When set, it overrides cluster_name in the config and is sent to RLClient.create_run as before; cluster validity and capacity are left to the backend (documented as a hard 400, no client-side name check).

CLI tests cover --help visibility, flag-over-TOML behavior, and the unchanged path when the flag is omitted (still uses config cluster_name).

Reviewed by Cursor Bugbot for commit c345a1b. Bugbot is set up for automated code reviews on this repo. Configure here.

Adds a `--cluster <name>` option to `prime train <config>` so users can
retarget a single dispatch without editing the TOML. The flag wins over
`cluster_name = "..."` in the config and forwards to the backend's
`cluster_name` payload field; the server's picker is the source of
truth for whether the cluster exists, is allocated, and has capacity,
so client-side validation stays out of the way.

Also exercised by the legacy `prime rl run` alias since both commands
share the same `create_run` entrypoint.
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