Compare commits

...
Author SHA1 Message Date
Mika SenghaasandGitHub 39ce147af0 bump vf v0.1.11.dev0 (#1780)
Release / Push CUDA image to Docker (push) Canceled after 0s
* fix custom token endpoint

* bump vf

* fix import

* use tito client via client_config not interleaved_rollout kwarg

* cosmetic

* revert lock

* update lock

* bump bump bump

* bump more
2026-02-15 06:11:33 -08:00
Mika SenghaasandGitHub 5e9548d425 make eval retries configurable and default to no retries (#1775)
Release / Push CUDA image to Docker (push) Canceled after 0s
2026-02-14 18:21:13 -08:00
3d1056a607 ci: add devx tag workflow from latest release (#1786)
Release / Push CUDA image to Docker (push) Canceled after 0s
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: samsja <samsja@users.noreply.github.com>
2026-02-14 17:15:42 -08:00
9 changed files with 48 additions and 45 deletions
+14 -2
View File
@@ -25,10 +25,10 @@ jobs:
const { owner, repo } = context.repo;
const sha = context.sha;
let baseTag;
let latestTag;
try {
const latestRelease = await github.rest.repos.getLatestRelease({ owner, repo });
baseTag = latestRelease.data.tag_name;
latestTag = latestRelease.data.tag_name;
} catch (error) {
if (error.status === 404) {
core.notice("No releases found. Skipping .dev tag creation.");
@@ -37,6 +37,18 @@ jobs:
throw error;
}
const semverMatch = /^(v?)(\d+)\.(\d+)(?:\.(\d+))?$/.exec(latestTag);
if (!semverMatch) {
core.setFailed(`Latest release tag '${latestTag}' is not semver-like.`);
return;
}
const [, versionPrefix, majorRaw, minorRaw, patchRaw] = semverMatch;
const major = Number.parseInt(majorRaw, 10);
const minor = Number.parseInt(minorRaw, 10);
const patch = Number.parseInt(patchRaw ?? "0", 10) + 1;
const baseTag = `${versionPrefix}${major}.${minor}.${patch}`;
const prefix = `${baseTag}.dev`;
const escapeRegex = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
const pattern = new RegExp(`^refs/tags/${escapeRegex(baseTag)}\\.dev(\\d+)$`);
+1 -1
View File
@@ -77,7 +77,7 @@ override-dependencies = [
[tool.uv.sources]
torch = { index = "pytorch-cu128" }
verifiers = { git = "https://github.com/PrimeIntellect-ai/verifiers.git", rev = "ccef044" }
verifiers = { git = "https://github.com/PrimeIntellect-ai/verifiers.git", rev = "786d300" }
torchtitan = { git = "https://github.com/pytorch/torchtitan", rev = "a1fdd7e" }
dion = { git = "https://github.com/samsja/dion.git", rev = "d891eeb" }
transformers = { git = "https://github.com/huggingface/transformers.git", rev = "609e3d5" }
+12 -2
View File
@@ -284,7 +284,7 @@ class EnvConfig(BaseConfig):
dict[str, Any],
Field(
description=(
"Extra kwargs passed to an env (e.g. seq_len, interleaved_rollouts, score_rollouts). This field is auto-populated with the seq_len, interleaved_rollouts, and score_rollouts for training envs on the orchestrator. It is generally NOT recommended for this field to be overriden by the user. It's main use case is to match the extra_env_kwargs when running an env in an isolated environment server."
"Extra kwargs passed to an env (e.g. seq_len, score_rollouts). This field is auto-populated with the seq_len, and score_rollouts for training envs on the orchestrator. It is generally NOT recommended for this field to be overriden by the user. It's main use case is to match the extra_env_kwargs when running an env in an isolated environment server."
),
),
] = {}
@@ -313,6 +313,17 @@ class EvalEnvConfig(EnvConfig):
),
] = 0
# TODO: should live on the EnvConfig and also apply to training envs but
# this is hard right now because we use the vf.EnvGroup which treats all
# envs as one. for now training envs hardcode no retries, but we should
# probably treat them like environment groups long-term
max_retries: Annotated[
int,
Field(
description="Maximum number of times the environment will try to retry running a rollout.",
),
] = 0
class ValConfig(BaseConfig):
"""Configures the validation of the model."""
@@ -798,7 +809,6 @@ class OrchestratorConfig(BaseSettings):
def resolve_extra_env_kwargs(self):
train_extra_env_kwargs = dict(
seq_len=self.seq_len,
interleaved_rollouts=True,
score_rollouts=not self.buffer.skip_verification,
)
for env in self.env:
+2 -1
View File
@@ -70,13 +70,14 @@ async def evaluate_env(
sampling_args: dict,
num_examples: int,
rollouts_per_example: int,
max_retries: int,
ckpt_step: int,
step: int | None,
):
logger = get_logger()
logger.info(f"Evaluating {env_name} ({num_examples=}, {rollouts_per_example=})")
eval_start_time = time.perf_counter()
outputs = await evaluate(env, clients, model_name, sampling_args, num_examples, rollouts_per_example)
outputs = await evaluate(env, clients, model_name, sampling_args, num_examples, rollouts_per_example, max_retries)
eval_time = time.perf_counter() - eval_start_time
rows = []
@@ -399,6 +399,7 @@ async def orchestrate(config: OrchestratorConfig):
sampling_args=eval_sampling_args,
num_examples=eval_env_config.num_examples or config.eval.num_examples,
rollouts_per_example=eval_env_config.rollouts_per_example or config.eval.rollouts_per_example,
max_retries=eval_env_config.max_retries,
ckpt_step=ckpt_step,
step=progress.step,
)
+6 -3
View File
@@ -11,7 +11,7 @@ from openai.types.completion_usage import CompletionUsage
from rich.console import Console
from rich.table import Table
from verifiers.utils.async_utils import maybe_semaphore
from verifiers.utils.client_utils import setup_client
from verifiers.utils.client_utils import setup_openai_client
from prime_rl.orchestrator.config import SamplingConfig
from prime_rl.transport import TrainingSample
@@ -151,7 +151,7 @@ async def compute_teacher_logprobs(
"""Compute teacher model logprobs for a batch of training samples via prefill."""
async def _compute_single(client_config: vf.ClientConfig, sample: TrainingSample) -> list[float]:
client = setup_client(client_config)
client = setup_openai_client(client_config)
async with await get_semaphore():
response = await client.post(
@@ -168,7 +168,10 @@ async def compute_teacher_logprobs(
},
cast_to=ChatCompletion,
)
return [0.0 if lp is None else float(next(iter(lp.values()))["logprob"]) for lp in response.prompt_logprobs]
return [
0.0 if lp is None else float(next(iter(lp.values()))["logprob"])
for lp in getattr(response, "prompt_logprobs", [])
]
return await asyncio.gather(*[_compute_single(client, sample) for client, sample in zip(cycle(clients), samples)])
+1 -27
View File
@@ -11,7 +11,7 @@ from verifiers.workers import ZMQEnvClient, ZMQEnvServer
from prime_rl.utils.logger import InterceptHandler, ProgressTracker, get_logger
DEFAULT_RETRIES = 3
DEFAULT_RETRIES = 0
REQUIRED_STATE_COLUMNS = ["trajectory", "sampling_args"]
DEFAULT_STATE_COLUMNS = []
@@ -81,32 +81,6 @@ async def wait_for_env_servers(
await asyncio.gather(*[wait_for_env_server(env_client) for env_client in env_clients])
async def run_rollout(
env: vf.Environment,
client: vf.ClientConfig,
model_name: str,
example: dict,
sampling_args: dict,
max_retries: int = DEFAULT_RETRIES,
state_columns: list[str] = DEFAULT_STATE_COLUMNS,
) -> vf.RolloutOutput:
"""
Wrapper for vf.Environment.run_rollout().
Asynchronously generates and scores a rollout.
"""
state_columns = state_columns + REQUIRED_STATE_COLUMNS
rollout_input = vf.RolloutInput(**example)
return await env.run_rollout(
rollout_input,
client=client,
model=model_name,
sampling_args=sampling_args,
max_retries=max_retries,
state_columns=state_columns,
)
async def run_group(
env: vf.Environment,
client: vf.ClientConfig,
+4 -3
View File
@@ -106,7 +106,7 @@ async def setup_inference_pool(client_config: ClientConfig, model_name: str) ->
return await ElasticInferencePool.from_config(client_config, model_name=model_name)
logger.info(
f"Initializing OpenAI client (base_url={', '.join(client_config.base_url)}, "
f"Initializing static inference pool (base_url={', '.join(client_config.base_url)}, "
f"api_key_var={client_config.api_key_var}, headers={client_config.headers})"
)
return StaticInferencePool(
@@ -117,9 +117,10 @@ async def setup_inference_pool(client_config: ClientConfig, model_name: str) ->
def setup_clients(client_config: ClientConfig) -> list[vf.ClientConfig]:
def _setup_client(client_idx: int, base_url: str) -> vf.ClientConfig:
def setup_client(client_idx: int, base_url: str) -> vf.ClientConfig:
return vf.ClientConfig(
client_idx=client_idx,
client_type="openai_chat_completions_token",
api_base_url=base_url,
api_key_var=client_config.api_key_var,
timeout=client_config.timeout,
@@ -129,7 +130,7 @@ def setup_clients(client_config: ClientConfig) -> list[vf.ClientConfig]:
extra_headers=client_config.headers,
)
return [_setup_client(client_idx, base_url) for client_idx, base_url in enumerate(client_config.base_url)]
return [setup_client(client_idx, base_url) for client_idx, base_url in enumerate(client_config.base_url)]
def setup_admin_clients(client_config: ClientConfig) -> list[AsyncClient]:
Generated
+7 -6
View File
@@ -118,7 +118,7 @@ wheels = [
[[package]]
name = "anthropic"
version = "0.71.0"
version = "0.79.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "anyio" },
@@ -130,9 +130,9 @@ dependencies = [
{ name = "sniffio" },
{ name = "typing-extensions" },
]
sdist = { url = "https://files.pythonhosted.org/packages/82/4f/70682b068d897841f43223df82d96ec1d617435a8b759c4a2d901a50158b/anthropic-0.71.0.tar.gz", hash = "sha256:eb8e6fa86d049061b3ef26eb4cbae0174ebbff21affa6de7b3098da857d8de6a", size = 489102, upload-time = "2025-10-16T15:54:40.08Z" }
sdist = { url = "https://files.pythonhosted.org/packages/15/b1/91aea3f8fd180d01d133d931a167a78a3737b3fd39ccef2ae8d6619c24fd/anthropic-0.79.0.tar.gz", hash = "sha256:8707aafb3b1176ed6c13e2b1c9fb3efddce90d17aee5d8b83a86c70dcdcca871", size = 509825, upload-time = "2026-02-07T18:06:18.388Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/5d/77/073e8ac488f335aec7001952825275582fb8f433737e90f24eeef9d878f6/anthropic-0.71.0-py3-none-any.whl", hash = "sha256:85c5015fcdbdc728390f11b17642a65a4365d03b12b799b18b6cc57e71fdb327", size = 355035, upload-time = "2025-10-16T15:54:38.238Z" },
{ url = "https://files.pythonhosted.org/packages/95/b2/cc0b8e874a18d7da50b0fda8c99e4ac123f23bf47b471827c5f6f3e4a767/anthropic-0.79.0-py3-none-any.whl", hash = "sha256:04cbd473b6bbda4ca2e41dd670fe2f829a911530f01697d0a1e37321eb75f3cf", size = 405918, upload-time = "2026-02-07T18:06:20.246Z" },
]
[[package]]
@@ -2358,7 +2358,7 @@ requires-dist = [
{ name = "torchtitan", git = "https://github.com/pytorch/torchtitan?rev=a1fdd7e" },
{ name = "transformers", git = "https://github.com/huggingface/transformers.git?rev=609e3d5" },
{ name = "uvloop", specifier = ">=0.21.0" },
{ name = "verifiers", git = "https://github.com/PrimeIntellect-ai/verifiers.git?rev=ccef044" },
{ name = "verifiers", git = "https://github.com/PrimeIntellect-ai/verifiers.git?rev=786d300" },
{ name = "vllm", url = "https://github.com/vllm-project/vllm/releases/download/v0.16.0/vllm-0.16.0-cp38-abi3-manylinux_2_31_x86_64.whl" },
{ name = "wandb", specifier = ">=0.24.2" },
]
@@ -3686,9 +3686,10 @@ wheels = [
[[package]]
name = "verifiers"
version = "0.1.10"
source = { git = "https://github.com/PrimeIntellect-ai/verifiers.git?rev=ccef044#ccef04486cda1759981dfc41b81b3939e5b69a9f" }
version = "0.1.11.dev0"
source = { git = "https://github.com/PrimeIntellect-ai/verifiers.git?rev=786d300#786d300bf5aab105279fc542dda838beafcb025e" }
dependencies = [
{ name = "anthropic" },
{ name = "datasets" },
{ name = "gepa" },
{ name = "jinja2" },