feat(orchestrator): support infinite tasksets (#2993)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat(orchestrator): support infinite tasksets An env server may now report num_tasks=None (verifiers#1969: an infinite, procedurally generated taskset). TrainSource streams a monotonic task_idx for such an env - the server generates tasks on demand, so every pull is a fresh task and there are no epochs to shuffle - while finite envs keep their shuffled index table. An eval env with an infinite taskset must set num_examples explicitly. Dormant until the verifiers pin includes #1969: a finite taskset still reports an int count and takes the existing paths. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump deps/verifiers to main (infinite tasksets) + relock Activates the orchestrator's infinite-taskset support: verifiers main now includes #1969, so the procedural v1 tasksets report num_tasks=None. The color-codeword-v1 configs drop their num_examples taskset field (the knob no longer exists - the taskset is unconditionally infinite and the train env streams); CHANGELOG entry for the removed size knobs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: drop CHANGELOG entry Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
b7b1f874b5
commit
961c11f4cf
@@ -22,7 +22,7 @@ max_completion_tokens = 64
|
||||
|
||||
[[orchestrator.train.env]]
|
||||
name = "color-codeword"
|
||||
taskset = { id = "color-codeword-v1", images_per_turn = 1, num_examples = 1000 }
|
||||
taskset = { id = "color-codeword-v1", images_per_turn = 1 }
|
||||
harness = { id = "null", runtime = { type = "subprocess" } }
|
||||
|
||||
[trainer]
|
||||
|
||||
@@ -41,7 +41,7 @@ max_completion_tokens = 64
|
||||
|
||||
[[orchestrator.train.env]]
|
||||
name = "color-codeword"
|
||||
taskset = { id = "color-codeword-v1", images_per_turn = 1, num_examples = 1000 }
|
||||
taskset = { id = "color-codeword-v1", images_per_turn = 1 }
|
||||
harness = { id = "null", runtime = { type = "subprocess" } }
|
||||
|
||||
# Default renderer (AutoRendererConfig) resolves Qwen3-VL-4B-Instruct from
|
||||
|
||||
Vendored
+1
-1
Submodule deps/verifiers updated: 6c64ce6a3a...31415cd32a
@@ -83,7 +83,8 @@ class Env:
|
||||
def __init__(self, config: EnvConfig):
|
||||
self.config = config
|
||||
self.sampling_args: dict = {}
|
||||
self.num_tasks: int = 0
|
||||
self.num_tasks: int | None = 0
|
||||
"""Task count reported by the server; ``None`` means the taskset is infinite."""
|
||||
self.requires_group_scoring: bool = False
|
||||
self._env_client: EnvClient | None = None
|
||||
self._env_server_process: BaseProcess | None = None
|
||||
@@ -112,9 +113,8 @@ class Env:
|
||||
info = await self.env_client.info()
|
||||
self.num_tasks = info.num_tasks
|
||||
self.requires_group_scoring = info.requires_group_scoring
|
||||
get_logger().info(
|
||||
f"Env {self.name} ready: num_tasks={self.num_tasks} group_scoring={self.requires_group_scoring}"
|
||||
)
|
||||
num_tasks = self.num_tasks if self.num_tasks is not None else "infinite"
|
||||
get_logger().info(f"Env {self.name} ready: num_tasks={num_tasks} group_scoring={self.requires_group_scoring}")
|
||||
|
||||
async def _spawn(self, log_dir: Path, log_level: str, json_logging: bool) -> str:
|
||||
"""Spawn a v1 EnvServer child process (it loads the env; we never do).
|
||||
@@ -220,7 +220,12 @@ class EvalEnv(Env):
|
||||
|
||||
async def start(self, log_dir: Path, log_level: str | None = None, json_logging: bool = False) -> None:
|
||||
await super().start(log_dir=log_dir, log_level=log_level, json_logging=json_logging)
|
||||
n = self.num_tasks if self.config.num_examples < 0 else min(self.config.num_examples, self.num_tasks)
|
||||
if self.num_tasks is None:
|
||||
if self.config.num_examples < 0:
|
||||
raise ValueError(f"Eval env {self.name} has an infinite taskset — set num_examples to bound it")
|
||||
n = self.config.num_examples
|
||||
else:
|
||||
n = self.num_tasks if self.config.num_examples < 0 else min(self.config.num_examples, self.num_tasks)
|
||||
self.examples = [{"task_idx": i} for i in range(n)]
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
"""TrainSource: weighted round-robin across train envs, infinite pull.
|
||||
|
||||
Weights are each env's configured ``ratio`` (default 1, i.e. equal weight
|
||||
per env). ``next_example`` reshuffles on cursor exhaustion."""
|
||||
per env). A finite env serves a shuffled task-index table, reshuffled on
|
||||
cursor exhaustion; an infinite env (``num_tasks is None``) streams a
|
||||
monotonic ``task_idx`` — the server generates tasks on demand, so every
|
||||
pull is a fresh task and there are no epochs to shuffle."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -22,17 +25,22 @@ class TrainSource:
|
||||
if not self.envs:
|
||||
raise ValueError("TrainSource needs at least one train env")
|
||||
|
||||
self.examples: dict[str, list[dict]] = {}
|
||||
# A finite env's shuffled index table; ``None`` for an infinite env,
|
||||
# whose cursor alone is the (monotonic) task_idx stream.
|
||||
self.examples: dict[str, list[dict] | None] = {}
|
||||
self.cursors: dict[str, int] = {}
|
||||
# Group-scoring envs reserve ``group_size`` permits up front;
|
||||
# per-rollout envs need 1
|
||||
self.env_costs: dict[str, int] = {}
|
||||
for env in self.envs:
|
||||
# The orchestrator never loads the env: sample over the task-index
|
||||
# range the server reported via info() (num_tasks).
|
||||
rows: list[dict] = [{"task_idx": i, "env_name": env.name} for i in range(env.num_tasks)]
|
||||
self.rng.shuffle(rows)
|
||||
self.examples[env.name] = rows
|
||||
# range the server reported via info() (num_tasks; None = infinite).
|
||||
if env.num_tasks is None:
|
||||
self.examples[env.name] = None
|
||||
else:
|
||||
rows: list[dict] = [{"task_idx": i, "env_name": env.name} for i in range(env.num_tasks)]
|
||||
self.rng.shuffle(rows)
|
||||
self.examples[env.name] = rows
|
||||
self.cursors[env.name] = 0
|
||||
self.env_costs[env.name] = env.config.group_size if env.requires_group_scoring else 1
|
||||
|
||||
@@ -45,6 +53,9 @@ class TrainSource:
|
||||
return None
|
||||
rows = self.examples[env_name]
|
||||
cursor = self.cursors[env_name]
|
||||
if rows is None: # infinite env: the cursor is the task_idx
|
||||
self.cursors[env_name] = cursor + 1
|
||||
return {"task_idx": cursor, "env_name": env_name}
|
||||
if cursor >= len(rows):
|
||||
self.rng.shuffle(rows)
|
||||
cursor = 0
|
||||
|
||||
@@ -81,6 +81,7 @@ members = [
|
||||
"mcp-atlas-v1",
|
||||
"mmlu-pro-v1",
|
||||
"mmmu",
|
||||
"mmmu-v1",
|
||||
"mrcr-v2-v1",
|
||||
"multiswe-v1",
|
||||
"nl2repobench-v1",
|
||||
@@ -3528,6 +3529,23 @@ requires-dist = [
|
||||
{ name = "verifiers", specifier = ">=0.1.4" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mmmu-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/verifiers/environments/mmmu_v1" }
|
||||
dependencies = [
|
||||
{ name = "datasets" },
|
||||
{ name = "pillow" },
|
||||
{ name = "verifiers" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "datasets" },
|
||||
{ name = "pillow" },
|
||||
{ name = "verifiers" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "modal"
|
||||
version = "1.5.1"
|
||||
@@ -4859,25 +4877,25 @@ dependencies = [
|
||||
[package.optional-dependencies]
|
||||
all = [
|
||||
{ name = "deep-ep", marker = "platform_machine == 'x86_64'" },
|
||||
{ name = "deep-gemm", version = "2.5.0+891d57b", source = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_aarch64.whl" }, marker = "platform_machine == 'aarch64' and sys_platform == 'linux'" },
|
||||
{ name = "deep-gemm", version = "2.5.0+891d57b", source = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_x86_64.whl" }, marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },
|
||||
{ name = "deep-gemm", version = "2.5.0+891d57b", source = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_aarch64.whl" }, marker = "platform_machine != 'x86_64'" },
|
||||
{ name = "deep-gemm", version = "2.5.0+891d57b", source = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_x86_64.whl" }, marker = "platform_machine == 'x86_64'" },
|
||||
{ name = "flash-attn", marker = "platform_machine == 'x86_64'" },
|
||||
{ name = "flash-attn-3" },
|
||||
{ name = "flash-attn-4" },
|
||||
{ name = "nixl" },
|
||||
{ name = "nixl-cu12", version = "0.10.1", source = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/nixl_cu12-0.10.1-cp312-cp312-linux_x86_64.whl" }, marker = "platform_machine == 'x86_64'" },
|
||||
{ name = "quack-kernels" },
|
||||
{ name = "vllm-router", version = "0.1.26", source = { url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_aarch64.whl" }, marker = "platform_machine == 'aarch64' and sys_platform == 'linux'" },
|
||||
{ name = "vllm-router", version = "0.1.26", source = { url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_x86_64.whl" }, marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },
|
||||
{ name = "vllm-router", version = "0.1.26", source = { url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_aarch64.whl" }, marker = "platform_machine != 'x86_64'" },
|
||||
{ name = "vllm-router", version = "0.1.26", source = { url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_x86_64.whl" }, marker = "platform_machine == 'x86_64'" },
|
||||
]
|
||||
disagg = [
|
||||
{ name = "deep-ep", marker = "platform_machine == 'x86_64'" },
|
||||
{ name = "deep-gemm", version = "2.5.0+891d57b", source = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_aarch64.whl" }, marker = "platform_machine == 'aarch64' and sys_platform == 'linux'" },
|
||||
{ name = "deep-gemm", version = "2.5.0+891d57b", source = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_x86_64.whl" }, marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },
|
||||
{ name = "deep-gemm", version = "2.5.0+891d57b", source = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_aarch64.whl" }, marker = "platform_machine != 'x86_64'" },
|
||||
{ name = "deep-gemm", version = "2.5.0+891d57b", source = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_x86_64.whl" }, marker = "platform_machine == 'x86_64'" },
|
||||
{ name = "nixl" },
|
||||
{ name = "nixl-cu12", version = "0.10.1", source = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/nixl_cu12-0.10.1-cp312-cp312-linux_x86_64.whl" }, marker = "platform_machine == 'x86_64'" },
|
||||
{ name = "vllm-router", version = "0.1.26", source = { url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_aarch64.whl" }, marker = "platform_machine == 'aarch64' and sys_platform == 'linux'" },
|
||||
{ name = "vllm-router", version = "0.1.26", source = { url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_x86_64.whl" }, marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },
|
||||
{ name = "vllm-router", version = "0.1.26", source = { url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_aarch64.whl" }, marker = "platform_machine != 'x86_64'" },
|
||||
{ name = "vllm-router", version = "0.1.26", source = { url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_x86_64.whl" }, marker = "platform_machine == 'x86_64'" },
|
||||
]
|
||||
flash-attn = [
|
||||
{ name = "flash-attn", marker = "platform_machine == 'x86_64'" },
|
||||
@@ -7543,6 +7561,7 @@ examples = [
|
||||
{ name = "deepwiki-v1", editable = "deps/verifiers/environments/deepwiki_v1" },
|
||||
{ name = "glossary-v1", editable = "deps/verifiers/environments/glossary_v1" },
|
||||
{ name = "gsm8k-v1", editable = "deps/verifiers/environments/gsm8k_v1" },
|
||||
{ name = "mmmu-v1", editable = "deps/verifiers/environments/mmmu_v1" },
|
||||
{ name = "reverse-text-v1", editable = "deps/verifiers/environments/reverse_text_v1" },
|
||||
{ name = "scratchpad-v1", editable = "deps/verifiers/environments/scratchpad_v1" },
|
||||
{ name = "wiki-search-v1", editable = "deps/verifiers/environments/wiki_search_v1" },
|
||||
|
||||
Reference in New Issue
Block a user