Skip to content

feat: per-source env-server address via serve.address - #3218

Merged
eexwhyzee merged 4 commits into
mainfrom
feat/per-source-env-server-address
Aug 8, 2026
Merged

feat: per-source env-server address via serve.address#3218
eexwhyzee merged 4 commits into
mainfrom
feat/per-source-env-server-address

Conversation

@mikasenghaas

@mikasenghaas mikasenghaas commented Aug 8, 2026

Copy link
Copy Markdown
Member

Summary

  • The per-source [serve] block is now verifiers' ServeConfig, consumed as-is — no prime-rl mirror or subclass. feat: make ServeConfig.address optional with no default verifiers#2301 (merged) makes ServeConfig.address optional with no default (str | None = None); this PR bumps deps/verifiers to that rev (29e3a0f7a, current verifiers main).
  • Unset address (default) keeps today's behavior: the launcher serves the source at the derived tcp://127.0.0.1:<env_server_base_port + index> address.
  • Set, the source's env server is externally managed: the launchers (local and SLURM) neither write its env-server TOML nor spawn a server for it, and the orchestrator connects to the given address — e.g. a k8s deployment running each env server in its own pod sets serve.address per source.
  • Indices stay positional across all sources, so setting one source's address never shifts another's derived port.
  • Standalone uv run env-server without an address keeps binding tcp://127.0.0.1:5000 (serve_env falls back to its default loopback bind on None).

Supersedes #3216: the same capability expressed on the source itself instead of a launcher-owned top-level map — no <split>/<resolved_name> string keys, and no key-typo validator needed since the field lives on the source it applies to.

Verification

Sanity-checked with the main venv against this branch and the new verifiers rev: a 3-source config (train/a, train/b with serve.address = "tcp://env-b.svc:5000", eval/c) yields env_addresses of {a: tcp://127.0.0.1:5000, b: tcp://env-b.svc:5000, c: tcp://127.0.0.1:5002}, env_servers() skips b, and the serialized orchestrator TOML round-trips the address while unset addresses don't serialize.

🤖 Generated with Claude Code

mikasenghaas and others added 2 commits August 8, 2026 00:13
Setting serve.address on a train/eval source marks its env server
externally managed: the launcher neither writes its TOML nor spawns a
server for it, and the orchestrator connects to the given address.
Unset sources keep the derived loopback address, with indices still
positional across all sources.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Companion verifiers bump makes ServeConfig.address optional with no
default, so the per-source serve block needs no prime-rl subclass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mikasenghaas
mikasenghaas marked this pull request as ready for review August 8, 2026 18:14
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 72a28e3. Configure here.

Comment thread src/prime_rl/entrypoints/rl.py
@eexwhyzee
eexwhyzee merged commit 3ab5e04 into main Aug 8, 2026
28 of 29 checks passed
@eexwhyzee
eexwhyzee deleted the feat/per-source-env-server-address branch August 8, 2026 23:38
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.

3 participants