Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9eacd477f1 | ||
|
|
40d130d8f1 | ||
|
|
7027f65e5f | ||
|
|
d51d0bb84c | ||
|
|
1b929ec184 | ||
|
|
d72e7e8b1e |
+15
-18
@@ -137,22 +137,6 @@ RUN --mount=type=cache,target=/usr/local/share/uv/cache \
|
||||
&& \
|
||||
/app/.venv/bin/python -c 'from importlib.metadata import version; [version(name) for name in ("deep-ep", "deep-gemm", "mamba-ssm", "nixl", "prime-kernels", "quack-kernels", "vllm", "vllm-router")]'
|
||||
|
||||
# Needed for private environments hub auth.
|
||||
#
|
||||
# FIXME(prime#940): workaround, remove once the prime CLI drops verifiers as
|
||||
# a dependency (https://github.com/PrimeIntellect-ai/prime/pull/940). The CLI
|
||||
# pins verifiers==0.2.0, which replaced the editable verifiers synced above
|
||||
# with the PyPI wheel and left prime-rl's own entrypoints unable to import;
|
||||
# the --overrides file ignores that one requirement. When removing it, drop
|
||||
# the overrides file and the --overrides flag, keep the import assertion, and
|
||||
# make the same change in scripts/docker-entrypoint.sh, which replays this
|
||||
# step for the runtime source overlay.
|
||||
RUN --mount=type=cache,target=/usr/local/share/uv/cache \
|
||||
printf 'verifiers\n' > /tmp/prime-cli-overrides.txt \
|
||||
&& VIRTUAL_ENV=/app/.venv uv pip install --overrides /tmp/prime-cli-overrides.txt 'prime>=0.7' \
|
||||
&& rm /tmp/prime-cli-overrides.txt \
|
||||
&& /app/.venv/bin/python -c 'import pathlib, verifiers; assert pathlib.Path(verifiers.__file__).is_relative_to("/app/deps/verifiers"), verifiers.__file__'
|
||||
|
||||
# Build NIXL from source against the UCX 1.19 baked above. The PyPI nixl wheel
|
||||
# ships its own UCX which segfaults on prefill→decode KV transfer (#2883);
|
||||
# rebuilding against our UCX is the documented fix. The rename is required: an
|
||||
@@ -160,6 +144,11 @@ RUN --mount=type=cache,target=/usr/local/share/uv/cache \
|
||||
# (the PyPI wheel) first, so the fix would silently not apply. Libraries carry
|
||||
# RUNPATH=/opt/ucx/lib, so no LD_LIBRARY_PATH is needed at runtime.
|
||||
# Opt out via `--build-arg INCLUDE_NIXL_FROM_SOURCE=0`.
|
||||
#
|
||||
# NIXL's [build-system] requires are unpinned, so pip's build isolation picks up
|
||||
# new backends as they are released. meson-python 0.22.0 stopped keeping Meson's
|
||||
# build RPATH in wheel libraries, which dropped RUNPATH=/opt/ucx/lib and failed
|
||||
# the linkage check below on every build. Pin the validated backend.
|
||||
ARG INCLUDE_NIXL_FROM_SOURCE=1
|
||||
ARG NIXL_VERSION=0.10.1
|
||||
RUN if [ "$INCLUDE_NIXL_FROM_SOURCE" = "1" ]; then \
|
||||
@@ -167,11 +156,19 @@ RUN if [ "$INCLUDE_NIXL_FROM_SOURCE" = "1" ]; then \
|
||||
&& git clone --depth 1 --branch ${NIXL_VERSION} https://github.com/ai-dynamo/nixl.git /tmp/nixl \
|
||||
&& cd /tmp/nixl \
|
||||
&& uv run --no-project --with tomlkit python contrib/tomlutil.py --wheel-name nixl-cu13 pyproject.toml \
|
||||
&& printf 'meson-python==0.21.1\n' > /tmp/nixl-build-constraints.txt \
|
||||
&& PKG_CONFIG_PATH=/opt/ucx/lib/pkgconfig \
|
||||
/app/.venv/bin/python -m pip wheel . --no-deps --wheel-dir=/tmp/nixl-whl \
|
||||
--build-constraint /tmp/nixl-build-constraints.txt \
|
||||
&& VIRTUAL_ENV=/app/.venv uv pip install --reinstall --no-deps /tmp/nixl-whl/nixl_cu13-*.whl \
|
||||
&& ldd /app/.venv/lib/python3.12/site-packages/.nixl_cu13.mesonpy.libs/plugins/libplugin_UCX.so | grep -q /opt/ucx/lib/libucp.so \
|
||||
&& rm -rf /tmp/nixl /tmp/nixl-whl; \
|
||||
&& PLUGIN=/app/.venv/lib/python3.12/site-packages/.nixl_cu13.mesonpy.libs/plugins/libplugin_UCX.so \
|
||||
&& if ! ldd "$PLUGIN" | grep -q /opt/ucx/lib/libucp.so; then \
|
||||
echo "ERROR: $PLUGIN does not link /opt/ucx/lib. RUNPATH and ldd output:" >&2; \
|
||||
readelf -d "$PLUGIN" | grep -E 'RUNPATH|RPATH' >&2 || true; \
|
||||
ldd "$PLUGIN" >&2; \
|
||||
exit 1; \
|
||||
fi \
|
||||
&& rm -rf /tmp/nixl /tmp/nixl-whl /tmp/nixl-build-constraints.txt; \
|
||||
fi
|
||||
|
||||
# Trim the CUDA toolkit to the nvcc-JIT essentials in a separate stage, so the runtime
|
||||
|
||||
Vendored
+1
-1
Submodule deps/renderers updated: 6b8da3f7b1...cde869941c
+1
-1
@@ -287,7 +287,7 @@ On the CLI the same keys are available as `--inference.vllm.max-num-seqs 256` (o
|
||||
|
||||
Router replay works by capturing the expert routing decisions into a buffer. This buffer then gets sent to the trainer, which can use it instead of re-computing the routing. This lowers the trainer↔inference mismatch by an order of magnitude, resulting in more stable training.
|
||||
|
||||
To enable router replay, you can set `inference.vllm.enable_return_routed_experts = true`. vLLM 0.29 uses the V2 model runner for standard deployments. Disaggregated P/D remains on V1 because NIXL routed-expert stitching is V1-only.
|
||||
To enable router replay, you can set `inference.vllm.enable_return_routed_experts = true`. Standard deployments use the V2 model runner. Disaggregated P/D remains on V1 because NIXL routed-expert stitching is V1-only.
|
||||
|
||||
```toml
|
||||
[trainer]
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@ FSDP2 is the default model sharding strategy. By default the trainer fully shard
|
||||
|
||||
EP shards MoE expert weights across the EP mesh, dramatically reducing the FSDP communication volume per layer and improving the training throughput. EP is only available with the custom model implementation (`model.impl = "custom"` or `"auto"` for supported families).
|
||||
|
||||
`ep` defaults to `"auto"`, which resolves at startup to the largest valid EP degree up to 8. It loads the model config to read `num_experts`, then picks the biggest divisor of `num_experts` that also divides the FSDP island size (`world_size // dp_replicate`), is a multiple of `cp`, and is <= 8. For non-MoE models, resolves to 1 (no-op). Set `ep` to an explicit integer to override:
|
||||
`ep` defaults to `"auto"`, which resolves at startup to the largest valid EP degree up to 8. It loads the model config to read `num_experts`, then picks the biggest divisor of `num_experts` that also divides the FSDP island size (`world_size // dp_replicate`), is a multiple of `cp`, and is at most 8. For non-MoE models, resolves to 1 (no-op). Set `ep` to an explicit integer to override:
|
||||
|
||||
```toml
|
||||
[trainer.model]
|
||||
|
||||
+6
-1
@@ -182,6 +182,8 @@ uv run sft @ examples/basic/reverse-text/sft.toml --monitors.wandb
|
||||
|
||||
Multi-GPU and multi-node use torchrun under the hood (the `sft` entrypoint manages this for you — see [Scaling § SFT and Torchrun](scaling.md#sft-and-torchrun) for non-default layouts; multi-node SFT goes through [SLURM](scaling.md#slurm)).
|
||||
|
||||
`--monitors.prime` streams the run to the Prime Intellect platform — see [Platform Monitoring](#platform-monitoring).
|
||||
|
||||
### Online Evals
|
||||
|
||||
`uv run sft` can evaluate the model on rollout-based envs as it trains, reusing the RL orchestrator's eval machinery. Configure an `[eval]` block — the same shape as `[orchestrator.eval]`: multiple `[[eval.source]]` envs with per-source `interval` / `select` / `group_size` / sampling overrides — plus an `[inference]` block for the vLLM server:
|
||||
@@ -383,6 +385,7 @@ Register a run on the Prime Intellect platform (Prime Lab) and stream training m
|
||||
|
||||
```bash
|
||||
uv run rl @ rl.toml --monitors.prime
|
||||
uv run sft @ sft.toml --monitors.prime # same flag on the SFT trainer
|
||||
```
|
||||
|
||||
Or set it in TOML:
|
||||
@@ -392,7 +395,9 @@ Or set it in TOML:
|
||||
name = "my-experiment"
|
||||
```
|
||||
|
||||
The monitor is a thin layer over the [`prime-runs`](https://github.com/PrimeIntellect-ai/prime/tree/main/packages/prime-runs) SDK (installed as `prime-runs[train]`): it registers the run, streams per-step metrics, uploads every 10th step's episodes (full conversations with rewards and advantages) to the run's sample viewer, and closes the run out. A process that exits without finishing is reported as crashed. Uploaded episodes are keyed to the platform run by the SDK; the orchestrator's own run id (the launcher's `PRL_RUN_ID`) stays on W&B and in the local records.
|
||||
The monitor is a thin layer over the [`prime-runs`](https://github.com/PrimeIntellect-ai/prime/tree/main/packages/prime-runs) SDK (installed as `prime-runs[train]`): it registers the run, streams per-step metrics, uploads every 10th step's episodes (full conversations with rewards and advantages) to the run's sample viewer, and closes the run out. Finalization is best-effort SDK delivery: a process that exits without finishing is reported crashed when the SDK's atexit hook runs, but an abrupt kill (SIGKILL, OOM, node loss) skips the report and a lost finalize is not retried — the platform owns the terminal state of attached (`RUN_ID`) and managed runs. Uploaded episodes are keyed to the platform run by the SDK; the orchestrator's own run id (the launcher's `PRL_RUN_ID`) stays on W&B and in the local records.
|
||||
|
||||
On `sft` the monitor registers the run with the dataset-batched training fields (`max_steps`, `batch_size`, `seq_len`) and streams the trainer's per-step metrics and validation losses; SFT has no rollouts, so no episodes are uploaded.
|
||||
|
||||
Requires `PRIME_API_KEY` (`prime login` or the env var) and a team (`PRIME_TEAM_ID`, or the team selected with `prime login`) enabled for external runs. A configured monitor must work: a missing key or a team outside the allowlist fails the launch. `PRIME_RUNS_MODE=disabled` keeps the monitor configured but opens no platform run; `RUN_ID=<id>` attaches to an external run a launcher already created instead of registering a new one. Currently internal-only.
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ from pathlib import Path
|
||||
import verifiers.v1 as vf
|
||||
from pydantic import AliasChoices, Field, model_validator
|
||||
|
||||
from prime_rl.configs.monitors import EvalMonitorsConfig, MonitorsConfig
|
||||
from prime_rl.configs.monitors import EvalMonitorsConfig
|
||||
from prime_rl.configs.orchestrator import ConcurrencyConfig, EvalSourcesConfig, ScheduledEvalConfig
|
||||
from prime_rl.configs.shared import ClientConfig, HeartbeatConfig, LogConfig, RunConfig
|
||||
from prime_rl.configs.trainer import WeightBroadcastConfig
|
||||
@@ -157,8 +157,14 @@ class SFTOnlineEvalConfig(ScheduledEvalConfig, ServedEvalConfig):
|
||||
|
||||
log: LogConfig = LogConfig()
|
||||
|
||||
monitors: MonitorsConfig = MonitorsConfig()
|
||||
"""Metric monitors (``monitors.wandb``, ``monitors.file``)."""
|
||||
monitors: EvalMonitorsConfig = EvalMonitorsConfig()
|
||||
"""Metric monitors (``monitors.wandb``, ``monitors.file``, ``monitors.prime``).
|
||||
|
||||
``EvalMonitorsConfig``, not the base ``MonitorsConfig``: the launcher
|
||||
converts the trainer's ``[monitors.prime]`` into a
|
||||
``PrimeEvalMonitorConfig`` for the online-eval process, and the base
|
||||
type would drop (or forbid) the prime block at the eval.json
|
||||
dump/re-parse boundary."""
|
||||
|
||||
@model_validator(mode="after")
|
||||
def auto_setup_broadcasts_dir(self):
|
||||
|
||||
@@ -640,6 +640,11 @@ class InferenceConfig(BaseConfig):
|
||||
if "enable_prompt_tokens_details" not in extra_fields:
|
||||
namespace.enable_prompt_tokens_details = True
|
||||
|
||||
# The orchestrator generates through /inference/v1/generate, a scale-out
|
||||
# endpoint that vLLM registers only with `--enable-scale-out`.
|
||||
if "enable_scale_out" not in extra_fields:
|
||||
namespace.enable_scale_out = True
|
||||
|
||||
# vLLM's DeepseekV2-family (and transformers-backend MoE) gates read
|
||||
# `moe_router_dtype` off the HF config to pick the router logits dtype.
|
||||
if self.enable_fp32_router_logits:
|
||||
|
||||
@@ -10,7 +10,7 @@ from renderers.base import MODEL_RENDERER_MAP
|
||||
|
||||
from prime_rl.configs.eval import SFTOnlineEvalConfig
|
||||
from prime_rl.configs.inference import InferenceConfig
|
||||
from prime_rl.configs.monitors import MonitorsConfig
|
||||
from prime_rl.configs.monitors import TrainMonitorsConfig
|
||||
from prime_rl.configs.shared import (
|
||||
EnvVars,
|
||||
HeartbeatConfig,
|
||||
@@ -229,8 +229,8 @@ class SFTConfig(BaseConfig):
|
||||
|
||||
log: TrainerLogConfig = TrainerLogConfig()
|
||||
|
||||
monitors: MonitorsConfig = MonitorsConfig()
|
||||
"""Metric monitors (``monitors.wandb``, ``monitors.file``)."""
|
||||
monitors: TrainMonitorsConfig = TrainMonitorsConfig()
|
||||
"""Metric monitors (``monitors.wandb``, ``monitors.file``, ``monitors.prime``)."""
|
||||
|
||||
run: RunConfig = Field(default_factory=RunConfig)
|
||||
"""Run metadata. ``run.name`` names the run directory under ``output_dir``."""
|
||||
@@ -249,7 +249,8 @@ class SFTConfig(BaseConfig):
|
||||
@model_validator(mode="after")
|
||||
def auto_setup_run_identity(self):
|
||||
"""Auto-generate the run name (``<dataset>--<model>--<short-id>``) when unset and
|
||||
default the run directory and W&B run name to it when not set explicitly."""
|
||||
default the run directory, W&B run name and platform run name to it when not
|
||||
set explicitly."""
|
||||
if self.run.name is None:
|
||||
dataset = str(getattr(self.data, "name", "")).split("/")[-1]
|
||||
model = self.model.name.split("/")[-1]
|
||||
@@ -259,6 +260,8 @@ class SFTConfig(BaseConfig):
|
||||
self.run.dir = self.run.name
|
||||
if self.monitors.wandb is not None and self.monitors.wandb.name is None:
|
||||
self.monitors.wandb.name = self.run.name
|
||||
if self.monitors.prime is not None and self.monitors.prime.name is None:
|
||||
self.monitors.prime.name = self.run.name
|
||||
return self
|
||||
|
||||
matmul_precision: Literal["highest", "high", "medium"] = "high"
|
||||
|
||||
@@ -107,7 +107,8 @@ def propagate_shared_fields(data: Any) -> Any:
|
||||
# [monitors.file] leaf. (Bare empty ``[monitors.file]`` block enablement is at the end.)
|
||||
propagate("monitors.file.path", "trainer.monitors.file.path", "orchestrator.monitors.file.path")
|
||||
|
||||
# [monitors.prime] leaf → orchestrator only (the trainer has no platform integration).
|
||||
# [monitors.prime] leaf → orchestrator only (the RL trainer has no platform
|
||||
# integration; the SFT trainer does, but it parses SFTConfig directly).
|
||||
propagate("monitors.prime.name", "orchestrator.monitors.prime.name")
|
||||
|
||||
# [tokenizer]. ``chat_template`` also flows to ``inference.vllm`` (vLLM's
|
||||
|
||||
+9
-9
@@ -16,7 +16,7 @@ dependencies = [
|
||||
"transformers==5.6.2",
|
||||
"wandb>=0.26.1",
|
||||
"wandb-workspaces>=0.4.3",
|
||||
"prime-sandboxes>=0.3.2",
|
||||
"prime>=0.8.0",
|
||||
"prime-runs[train]>=0.1.3",
|
||||
"pyzmq>=27.1.0",
|
||||
"aiolimiter>=1.2.1",
|
||||
@@ -56,7 +56,7 @@ gpu = [
|
||||
"torchvision ; sys_platform == 'linux'",
|
||||
"torchaudio ; sys_platform == 'linux'",
|
||||
"torchdata>=0.11.0 ; sys_platform == 'linux'",
|
||||
"vllm>=0.29.0 ; sys_platform == 'linux'",
|
||||
"vllm>=0.30.0 ; sys_platform == 'linux'",
|
||||
"mooncake-transfer-engine>=0.3.10.post2 ; sys_platform == 'linux'",
|
||||
"ring-flash-attn>=0.1.8 ; sys_platform == 'linux'",
|
||||
"torchtitan ; sys_platform == 'linux'",
|
||||
@@ -146,9 +146,9 @@ override-dependencies = [
|
||||
# Shared by vLLM, TileLang, and the pinned FlashAttention 4 runtime.
|
||||
"apache-tvm-ffi==0.1.11",
|
||||
"nvidia-cudnn-cu13>=9.15 ; sys_platform == 'linux'",
|
||||
# vLLM 0.29.0 requires quack-kernels 0.6.4. It requires this exact CUTLASS version.
|
||||
# vLLM 0.30.0 requires this exact CUTLASS DSL version and quack-kernels 0.6.5.
|
||||
# Keep this pin aligned with quack-kernels and the flash-attn-4 revision below.
|
||||
"nvidia-cutlass-dsl==4.6.2",
|
||||
"nvidia-cutlass-dsl==4.7.1",
|
||||
"transformers==5.6.2",
|
||||
"torch>=2.13.0",
|
||||
"openenv-core",
|
||||
@@ -217,10 +217,10 @@ requires-dist = ["nixl-cu13==0.10.1"]
|
||||
# so resolve that variant without installing both runtime packages.
|
||||
[[tool.uv.dependency-metadata]]
|
||||
name = "nvidia-cutlass-dsl"
|
||||
version = "4.6.2"
|
||||
version = "4.7.1"
|
||||
requires-dist = [
|
||||
"nvidia-cutlass-dsl-libs-base==4.6.2",
|
||||
"nvidia-cutlass-dsl-libs-cu13==4.6.2",
|
||||
"nvidia-cutlass-dsl-libs-base==4.7.1",
|
||||
"nvidia-cutlass-dsl-libs-cu13==4.7.1",
|
||||
]
|
||||
|
||||
[tool.uv.exclude-newer-package]
|
||||
@@ -274,8 +274,8 @@ vllm-router = [
|
||||
{ url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.2.1/vllm_router-0.2.1-cp38-abi3-manylinux_2_28_aarch64.whl", marker = "platform_machine == 'aarch64'" },
|
||||
]
|
||||
vllm = [
|
||||
{ url = "https://github.com/vllm-project/vllm/releases/download/v0.29.0/vllm-0.29.0-cp38-abi3-manylinux_2_28_x86_64.whl", marker = "platform_machine == 'x86_64'" },
|
||||
{ url = "https://github.com/vllm-project/vllm/releases/download/v0.29.0/vllm-0.29.0-cp38-abi3-manylinux_2_28_aarch64.whl", marker = "platform_machine == 'aarch64'" },
|
||||
{ url = "https://github.com/vllm-project/vllm/releases/download/v0.30.0/vllm-0.30.0-cp38-abi3-manylinux_2_28_x86_64.whl", marker = "platform_machine == 'x86_64'" },
|
||||
{ url = "https://github.com/vllm-project/vllm/releases/download/v0.30.0/vllm-0.30.0-cp38-abi3-manylinux_2_28_aarch64.whl", marker = "platform_machine == 'aarch64'" },
|
||||
]
|
||||
deep-ep = [
|
||||
{ url = "https://github.com/PrimeIntellect-ai/prime-kernels/releases/download/v0.1.1/deep_ep-1.2.1+29d31c0-cp312-cp312-linux_x86_64.whl", marker = "platform_machine == 'x86_64'" },
|
||||
|
||||
@@ -58,7 +58,7 @@ if [ -n "$PRIME_RL_REF" ]; then
|
||||
# submodules' git metadata so the fallback is what gets used. The
|
||||
# shallow clones carry no tags, so hatch-vcs would otherwise stamp
|
||||
# them 0.0.1.dev1 and every `verifiers>=…` floor in the tree would be
|
||||
# unmet, letting the CLI install below swap the editable for a wheel.
|
||||
# unmet.
|
||||
if [ -f "$DEST/scripts/docker-editable-pretend-versions.sh" ]; then
|
||||
eval "$(bash "$DEST/scripts/docker-editable-pretend-versions.sh" --shell "$DEST")"
|
||||
rm -f "$DEST/deps/verifiers/.git" "$DEST/deps/renderers/.git"
|
||||
@@ -115,21 +115,6 @@ HEAVY_PINS_PY
|
||||
--extra gpu --extra dashboard --extra flash-attn --extra flash-attn-3 \
|
||||
--extra flash-attn-cute --extra disagg --extra quack --extra kernels \
|
||||
--group mamba-ssm )
|
||||
# Replay the image's post-sync step (Dockerfile.cuda; keep the two in
|
||||
# sync): the prime CLI pulls prime-traces / prime-sandboxes / openai
|
||||
# past the lock's pins, and the --locked sync above just rolled them
|
||||
# back, which leaves `prime env install` unable to import.
|
||||
#
|
||||
# FIXME(prime#940): workaround, remove once the prime CLI drops
|
||||
# verifiers as a dependency
|
||||
# (https://github.com/PrimeIntellect-ai/prime/pull/940). The CLI pins
|
||||
# verifiers==0.2.0, which would swap the editable for the PyPI wheel
|
||||
# and break prime-rl's imports; the --overrides file ignores that one
|
||||
# requirement. When removing it, drop the overrides file and the
|
||||
# --overrides flag here and in Dockerfile.cuda.
|
||||
echo "[prime-rl] installing the prime CLI"
|
||||
printf 'verifiers\n' > /tmp/prime-cli-overrides.txt
|
||||
uv pip install --overrides /tmp/prime-cli-overrides.txt 'prime>=0.7'
|
||||
# The chart's `uv run --no-sync <entrypoint>` commands resolve the
|
||||
# project from the cwd; the venv itself stays /app/.venv via
|
||||
# UV_PROJECT_ENVIRONMENT above.
|
||||
|
||||
@@ -134,9 +134,6 @@ main() {
|
||||
source $HOME/.local/bin/env
|
||||
fi
|
||||
|
||||
log_info "Installing prime..."
|
||||
uv tool install prime
|
||||
|
||||
log_info "Syncing virtual environment..."
|
||||
uv sync --all-extras
|
||||
|
||||
|
||||
@@ -94,7 +94,13 @@ export LD_LIBRARY_PATH="$UCX_INSTALL/lib:$UCX_INSTALL/lib/ucx:${LD_LIBRARY_PATH:
|
||||
WHEEL_DIR="$PROJECT_DIR/deps"
|
||||
mkdir -p "$WHEEL_DIR"
|
||||
uv pip install pip 2>/dev/null
|
||||
"$PYTHON" -m pip wheel . --no-deps --wheel-dir="$WHEEL_DIR"
|
||||
# NIXL's [build-system] requires are unpinned; meson-python 0.22.0 stopped
|
||||
# keeping Meson's build RPATH in wheel libraries, which drops the link to the
|
||||
# UCX built above. Constrain the backend to the version these wheels were
|
||||
# validated with (same pin as Dockerfile.cuda).
|
||||
printf 'meson-python==0.21.1\n' > "$WORKSPACE/nixl-build-constraints.txt"
|
||||
"$PYTHON" -m pip wheel . --no-deps --wheel-dir="$WHEEL_DIR" \
|
||||
--build-constraint "$WORKSPACE/nixl-build-constraints.txt"
|
||||
|
||||
WHEEL=$(ls "$WHEEL_DIR"/nixl_cu13-"$NIXL_VERSION"-*.whl | head -1)
|
||||
echo "=== NIXL wheel built at: $WHEEL ==="
|
||||
|
||||
@@ -9,6 +9,7 @@ from subprocess import Popen
|
||||
from threading import Event, Thread
|
||||
|
||||
from prime_rl.configs.eval import SFTOnlineEvalConfig
|
||||
from prime_rl.configs.monitors import EvalMonitorsConfig, PrimeEvalMonitorConfig, TrainMonitorsConfig
|
||||
from prime_rl.configs.orchestrator import OnlineEvalSourceConfig
|
||||
from prime_rl.configs.sft import SFTConfig
|
||||
from prime_rl.configs.shared import LogConfig
|
||||
@@ -72,6 +73,16 @@ def resolve_resume_step(config: SFTConfig) -> int | None:
|
||||
return resolve_latest_ckpt_step(get_ckpt_dir(get_ckpt_base(config)))
|
||||
|
||||
|
||||
def build_online_eval_monitors(monitors: TrainMonitorsConfig) -> EvalMonitorsConfig:
|
||||
"""The online-eval process's monitors: same W&B and file config as the trainer's,
|
||||
with the platform monitor switched to the evaluation flavor under the same name."""
|
||||
return EvalMonitorsConfig(
|
||||
wandb=monitors.wandb,
|
||||
file=monitors.file,
|
||||
prime=PrimeEvalMonitorConfig(name=monitors.prime.name) if monitors.prime is not None else None,
|
||||
)
|
||||
|
||||
|
||||
def build_online_eval_config(config: SFTConfig) -> SFTOnlineEvalConfig:
|
||||
"""The online-eval process's config: the resolved ``[eval]`` block with the run-level
|
||||
fields filled from the SFT config. The launcher spawns the env servers itself; the
|
||||
@@ -85,9 +96,14 @@ def build_online_eval_config(config: SFTConfig) -> SFTOnlineEvalConfig:
|
||||
broadcasts_dir=get_broadcast_dir(config.run_dir),
|
||||
max_steps=config.max_steps,
|
||||
resume_step=resolve_resume_step(config),
|
||||
# Same run dir as the trainer: the dashboard reads the eval's
|
||||
# file-monitor artifacts from the run directory, so a separate
|
||||
# output dir would hide them. The train-vs-eval record collision
|
||||
# is resolved by record merging in prime_rl.monitors.prime, not
|
||||
# by directory separation.
|
||||
output_dir=config.run_dir,
|
||||
log=LogConfig(level=config.log.level, json_logging=config.log.json_logging),
|
||||
monitors=config.monitors,
|
||||
monitors=build_online_eval_monitors(config.monitors),
|
||||
)
|
||||
return SFTOnlineEvalConfig(**{**eval_config.model_dump(exclude=set(run_fields)), **run_fields})
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ class OnlineEval:
|
||||
await monitors.setup(
|
||||
producer="online-eval",
|
||||
wandb=config.monitors.wandb,
|
||||
prime=config.monitors.prime,
|
||||
file=config.monitors.file,
|
||||
output_dir=config.output_dir,
|
||||
run_config=config,
|
||||
|
||||
@@ -21,8 +21,6 @@ def apply_shared_vllm_patches():
|
||||
monkey_patch_online_fp8_parameter_cast()
|
||||
monkey_patch_deepseek_v4_allowed_layer_types()
|
||||
monkey_patch_deepseek_v4_request_tools_placement()
|
||||
monkey_patch_deepseek_v4_per_layer_rope()
|
||||
monkey_patch_deepseek_v4_bf16_o_proj()
|
||||
|
||||
|
||||
def monkey_patch_deepseek_v4_allowed_layer_types():
|
||||
@@ -185,110 +183,6 @@ def monkey_patch_kv_xfer_finished_tolerate_freed():
|
||||
logger.warning("Patched Scheduler._update_from_kv_xfer_finished to tolerate freed (aborted) KV-transfer reqs.")
|
||||
|
||||
|
||||
def monkey_patch_deepseek_v4_bf16_o_proj():
|
||||
"""Run DeepSeek V4's output projection in bf16 when the weights are not FP8.
|
||||
|
||||
vLLM's DeepSeek V4 output projection is FP8-only. All three CUDA attention
|
||||
classes (``DeepseekV4FlashMLAAttention``,
|
||||
``DeepseekV4FlashInferMLAAttention``, ``DeepseekV4FlashInferSM120Attention``)
|
||||
implement ``_o_proj`` by calling ``deep_gemm_fp8_o_proj``
|
||||
(``vllm/models/deepseek_v4/nvidia/ops/o_proj.py``), which dereferences
|
||||
``wo_a.weight_scale``, falling back to ``wo_a.weight_scale_inv``, and hands
|
||||
the result to DeepGEMM's ``fp8_einsum``. There is no branch on quant config
|
||||
or weight dtype, and ``_o_proj`` is an ``@abstractmethod`` dispatched purely
|
||||
by platform subclass, so no attention backend routes around it. A bf16
|
||||
checkpoint has neither attribute and therefore fails with
|
||||
``AttributeError: 'ColumnParallelLinear' object has no attribute
|
||||
'weight_scale_inv'``.
|
||||
|
||||
Quantizing is not an answer, because nothing quantizes by default:
|
||||
``[inference.vllm] quantization`` is unset, which leaves vLLM to infer the
|
||||
scheme from the checkpoint. bf16 DeepSeek V4 checkpoints are a first-class
|
||||
artifact here, written by ``tools/convert_fp8_to_bf16.py``,
|
||||
``tools/convert_dcp_to_bf16.py``, and trainer exports, and they carry no
|
||||
scales for the op to find. Passing ``--quantization fp8_per_block`` does
|
||||
produce a correct ``weight_scale_inv`` and is a genuine alternative on
|
||||
hardware whose DeepGEMM build has block-scaled FP8 kernels, but it changes
|
||||
the served numerics, so it is a deployment decision rather than a fix for
|
||||
serving the bf16 weights as given.
|
||||
|
||||
Only the unquantized case is redirected: an FP8 weight keeps using vLLM's own
|
||||
kernel, so a real FP8-serialized checkpoint behaves exactly as before. The
|
||||
condition is the weight dtype rather than the presence of
|
||||
``weight_scale_inv``, so a checkpoint that *is* quantized but whose scales
|
||||
ended up in the wrong layout still fails loudly instead of being silently
|
||||
rerouted.
|
||||
|
||||
The replacement mirrors the Triton kernel's arithmetic
|
||||
(``vllm/models/deepseek_v4/common/ops/fused_inv_rope_fp8_quant.py:95-105``)
|
||||
without the quantization step. The trailing ``rope_dim`` channels of each head
|
||||
carry an inverse RoPE over interleaved pairs, with ``cos_sin_cache`` holding
|
||||
``rope_dim // 2`` cosines followed by the matching sines:
|
||||
|
||||
y[even] = x[even] * cos + x[odd] * sin
|
||||
y[odd] = x[odd] * cos - x[even] * sin
|
||||
|
||||
The remaining ``nope_dim`` channels pass through. The projection is the same
|
||||
grouped contraction ``fp8_einsum`` performs, with the group axis recovered by
|
||||
reshaping: head ``g * heads_per_group + i`` belongs to group ``g`` at offset
|
||||
``i * head_dim``, matching the kernel's own
|
||||
``g = pid_gh // heads_per_group`` indexing.
|
||||
|
||||
Rotation is computed in fp32 and the contraction runs in bf16, whose CUDA
|
||||
matmuls accumulate in fp32. That is strictly more accurate than the FP8 path
|
||||
it replaces, and it avoids materializing an fp32 copy of the attention output.
|
||||
"""
|
||||
from vllm.models.deepseek_v4.nvidia import flashinfer_sparse, flashmla
|
||||
from vllm.models.deepseek_v4.nvidia.ops import o_proj as o_proj_module
|
||||
|
||||
original_o_proj = o_proj_module.deep_gemm_fp8_o_proj
|
||||
if getattr(original_o_proj, "_prime_rl_has_bf16_fallback", False):
|
||||
return
|
||||
|
||||
def _inverse_rope(o, positions, cos_sin_cache, rope_dim):
|
||||
num_tokens, num_heads, head_dim = o.shape
|
||||
half_rope = rope_dim // 2
|
||||
cos_sin = cos_sin_cache[positions].float()
|
||||
cos = cos_sin[:, :half_rope].view(num_tokens, 1, half_rope)
|
||||
sin = cos_sin[:, half_rope:].view(num_tokens, 1, half_rope)
|
||||
|
||||
rotated = o[:, :, head_dim - rope_dim :].float().reshape(num_tokens, num_heads, half_rope, 2)
|
||||
even, odd = rotated[..., 0], rotated[..., 1]
|
||||
pairs = torch.stack((even * cos + odd * sin, odd * cos - even * sin), dim=-1)
|
||||
|
||||
out = o.clone()
|
||||
out[:, :, head_dim - rope_dim :] = pairs.reshape(num_tokens, num_heads, rope_dim).to(o.dtype)
|
||||
return out
|
||||
|
||||
def _patched_o_proj(o, positions, cos_sin_cache, wo_a, wo_b, *, n_groups, heads_per_group, **kwargs):
|
||||
if wo_a.weight.dtype == torch.float8_e4m3fn:
|
||||
return original_o_proj(
|
||||
o,
|
||||
positions,
|
||||
cos_sin_cache,
|
||||
wo_a,
|
||||
wo_b,
|
||||
n_groups=n_groups,
|
||||
heads_per_group=heads_per_group,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
x = _inverse_rope(o, positions, cos_sin_cache, kwargs["rope_dim"])
|
||||
x = x.reshape(o.shape[0], n_groups, heads_per_group * o.shape[-1])
|
||||
weight = wo_a.weight.view(n_groups, kwargs["o_lora_rank"], -1)
|
||||
z = torch.einsum("tgr,gdr->tgd", x, weight)
|
||||
return wo_b(z.flatten(1))
|
||||
|
||||
_patched_o_proj._prime_rl_has_bf16_fallback = True
|
||||
o_proj_module.deep_gemm_fp8_o_proj = _patched_o_proj
|
||||
|
||||
# Both attention modules did `from ...ops.o_proj import deep_gemm_fp8_o_proj` at
|
||||
# import time, so patching the defining module alone would not reach the names
|
||||
# their `_o_proj` methods actually call.
|
||||
flashmla.deep_gemm_fp8_o_proj = _patched_o_proj
|
||||
flashinfer_sparse.deep_gemm_fp8_o_proj = _patched_o_proj
|
||||
|
||||
|
||||
def monkey_patch_nano_v3_reasoning_parser():
|
||||
from vllm.reasoning.abs_reasoning_parsers import ReasoningParserManager
|
||||
from vllm.reasoning.deepseek_r1_reasoning_parser import DeepSeekR1ReasoningParser
|
||||
@@ -795,126 +689,3 @@ def monkey_patch_dp_coordinator_startup_timeout():
|
||||
zmq_addr_pipe.close()
|
||||
|
||||
DPCoordinator._wait_for_zmq_addrs = _patched_wait_for_zmq_addrs
|
||||
|
||||
|
||||
_DEEPSEEK_V4_YARN_ROPE_TYPES = frozenset({"yarn", "deepseek_yarn", "deepseek_llama_scaling"})
|
||||
|
||||
|
||||
def _deepseek_v4_rope_parameters(rope_parameters, *, compress_ratio, max_position_embeddings):
|
||||
"""Flat, single-layer rope parameters for `build_deepseek_v4_rope`.
|
||||
|
||||
Handles both on-disk schemas. The real checkpoint ships a flat legacy `rope_scaling`, which
|
||||
vLLM's config shim normalizes in place. HF's own `DeepseekV4Config` nests the parameters
|
||||
under `main`/`compress` rope-type labels instead, and so does this repo's port. vLLM's shim
|
||||
cannot read that: `is_rope_parameters_nested` only recognizes nesting by *attention* layer
|
||||
type, so transformers leaves the sub-dicts alone and injects a top-level
|
||||
`rope_type="default"` beside them. Upstream then builds unscaled RoPE for every layer and
|
||||
hands `get_rope` a cache key containing a dict, which is unhashable. Selecting the branch
|
||||
this layer wants resolves both. Upstream picks the base from `config.rope_theta` /
|
||||
`config.compress_rope_theta` on its own either way.
|
||||
"""
|
||||
rope_parameters = rope_parameters if isinstance(rope_parameters, dict) else {}
|
||||
# `compress_ratio` is already clamped to >= 1 by the caller, so <= 1 is "no compressor",
|
||||
# i.e. the reference's `else` branch. vLLM lumps the MTP layers in here too.
|
||||
is_sliding = compress_ratio <= 1
|
||||
|
||||
if any(isinstance(value, dict) for value in rope_parameters.values()):
|
||||
label = "main" if is_sliding else "compress"
|
||||
branch = rope_parameters.get(label)
|
||||
if not isinstance(branch, dict):
|
||||
raise ValueError(
|
||||
f"DeepSeek V4 rope_parameters is nested by rope type but has no {label!r} "
|
||||
f"sub-dict; found {sorted(rope_parameters)}."
|
||||
)
|
||||
parameters = dict(branch)
|
||||
else:
|
||||
parameters = dict(rope_parameters)
|
||||
|
||||
rope_type = parameters.get("rope_type", parameters.get("type", "default"))
|
||||
if is_sliding or rope_type not in _DEEPSEEK_V4_YARN_ROPE_TYPES:
|
||||
# Plain RoPE, written as YaRN with `factor=1` rather than as `rope_type="default"`.
|
||||
# The table is the same either way, since `_compute_inv_freq`'s interpolated and
|
||||
# extrapolated frequencies coincide at `factor=1` and `yarn_get_mscale` returns 1.0,
|
||||
# but `"default"` would route `get_rope` to a plain `RotaryEmbedding`, whose cache
|
||||
# follows the ambient dtype and so fails the fp32 assertion in
|
||||
# `vllm/models/deepseek_v4/common/ops/fused_inv_rope_fp8_quant.py`.
|
||||
# `original_max_position_embeddings` is widened because the cache is
|
||||
# `original_max * factor` rows and must still span the context.
|
||||
rope_type = "yarn"
|
||||
parameters["factor"] = 1
|
||||
parameters["original_max_position_embeddings"] = max_position_embeddings
|
||||
parameters["rope_type"] = rope_type
|
||||
return parameters
|
||||
|
||||
|
||||
def monkey_patch_deepseek_v4_per_layer_rope():
|
||||
"""Give each DeepSeek V4 layer the RoPE its reference implementation uses.
|
||||
|
||||
DeepSeek ships the reference inside the checkpoint we serve, at
|
||||
https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash-0731/tree/main/inference. Its
|
||||
`model.py:481-485` picks the frequencies per layer:
|
||||
|
||||
if self.compress_ratio:
|
||||
original_seq_len, rope_theta = args.original_seq_len, args.compress_rope_theta
|
||||
else:
|
||||
# disable YaRN and use base rope_theta in pure sliding-window attention
|
||||
original_seq_len, rope_theta = 0, args.rope_theta
|
||||
|
||||
and `precompute_freqs_cis` (`model.py:206-235`) applies the NTK-by-parts ramp only when
|
||||
`original_seq_len > 0`. So a pure sliding-window layer gets plain RoPE at `rope_theta` and
|
||||
every compressed layer gets YaRN at `compress_rope_theta`. HF's `DeepseekV4Config` splits its
|
||||
`rope_parameters` into `main`/`compress` for the same reason, and so does this repo's trainer.
|
||||
|
||||
`vllm/models/deepseek_v4/common/rope.py`'s `build_deepseek_v4_rope` branches the base on
|
||||
`compress_ratio` but never the scaling, so on the real checkpoint it hands YaRN to layers 0
|
||||
and 1 as well. No config value can correct that: `rope_type` is one global field there.
|
||||
So this patch resolves `rope_parameters` per layer instead, which also gives upstream a
|
||||
schema and a dtype it can handle; see `_deepseek_v4_rope_parameters` above.
|
||||
|
||||
Measured against the reference's own frequencies, at the test's `factor=16`,
|
||||
`original_max_position_embeddings=4096` geometry, this takes the sliding layers from 5.1e-03
|
||||
max absolute error to 6e-08, the float32 residual the compressed layers already have. The
|
||||
rope tests in `tests/unit/train/models/test_deepseek_v4.py` are that comparison, over both
|
||||
on-disk schemas and both scaled and unscaled configs.
|
||||
|
||||
Note that nothing in vLLM's DeepSeek V4 calls the module's `forward`; every consumer reads
|
||||
`cos_sin_cache` and hands it to a fused kernel. The class choice is therefore about the
|
||||
cache's dtype and row count, not about which channels the module would rotate.
|
||||
|
||||
Remove this patch once the pin includes vllm-project/vllm#54815, which ships in 0.29.1.
|
||||
"""
|
||||
from vllm.models.deepseek_v4.common import rope as dsv4_rope
|
||||
|
||||
original_build = dsv4_rope.build_deepseek_v4_rope
|
||||
|
||||
if getattr(original_build, "_prime_rl_matches_deepseek_reference", False):
|
||||
return
|
||||
|
||||
def _patched_build(config, *, head_dim, rope_head_dim, max_position_embeddings, compress_ratio):
|
||||
# Swapping a copy in also spares `config.rope_parameters` upstream's in-place mutation,
|
||||
# which otherwise leaves the last-built layer's `rope_theta` on the shared config.
|
||||
original_parameters = config.rope_parameters
|
||||
config.rope_parameters = _deepseek_v4_rope_parameters(
|
||||
original_parameters,
|
||||
compress_ratio=compress_ratio,
|
||||
max_position_embeddings=max_position_embeddings,
|
||||
)
|
||||
try:
|
||||
return original_build(
|
||||
config,
|
||||
head_dim=head_dim,
|
||||
rope_head_dim=rope_head_dim,
|
||||
max_position_embeddings=max_position_embeddings,
|
||||
compress_ratio=compress_ratio,
|
||||
)
|
||||
finally:
|
||||
config.rope_parameters = original_parameters
|
||||
|
||||
_patched_build._prime_rl_matches_deepseek_reference = True
|
||||
dsv4_rope.build_deepseek_v4_rope = _patched_build
|
||||
|
||||
# `attention.py` imports the builder into its own namespace, so the defining module alone
|
||||
# would not reach the already-bound reference.
|
||||
from vllm.models.deepseek_v4 import attention as dsv4_attention
|
||||
|
||||
dsv4_attention.build_deepseek_v4_rope = _patched_build
|
||||
|
||||
@@ -26,7 +26,7 @@ from prime_rl.inference.patches import (
|
||||
)
|
||||
|
||||
# NOTE: Monkeypatch TokenizeParams to fix overly conservative validation
|
||||
# Still needed in vLLM 0.29 — upstream rejects prompt_len > max_model_len - max_tokens
|
||||
# Still needed in vLLM 0.30 — upstream rejects prompt_len > max_model_len - max_tokens
|
||||
monkey_patch_tokenize_params_validation()
|
||||
# NOTE: Register Nano V3 reasoning parser so configs can use
|
||||
# `reasoning_parser = "nano_v3"` without a vLLM plugin file.
|
||||
|
||||
@@ -4,25 +4,19 @@ vLLM ships a generic tokens-in / tokens-out handler at
|
||||
``vllm.entrypoints.scale_out.token_in_token_out.serving.ServingTokens`` that covers
|
||||
prefix-cache salting, lora dispatch, multimodal content parts and features,
|
||||
prompt logprobs, priority, ``data_parallel_rank`` header routing, server-side
|
||||
``max_tokens`` defaulting and ``usage`` reporting. We subclass it for the bits
|
||||
still missing from the upstream handler:
|
||||
|
||||
1. Compact ``routed_experts`` export — when the engine emits routing
|
||||
decisions, surface them as ``{data, shape, start, dtype}`` base64 raw-byte
|
||||
objects (the form the PD router can merge and the renderers parse) instead
|
||||
of upstream's single ``.npy`` base64 string.
|
||||
|
||||
2. Prompt metadata — return the effective engine prompt and authoritative
|
||||
multimodal placeholder ranges after expansion. Drop this once upstream's
|
||||
response includes these fields.
|
||||
``max_tokens`` defaulting, ``usage`` reporting, and expanded prompt metadata.
|
||||
We subclass it for the one bit still missing from the upstream handler: compact
|
||||
``routed_experts`` export. When the engine emits routing decisions, surface them
|
||||
as ``{data, shape, start, dtype}`` base64 raw-byte objects (the form the PD
|
||||
router can merge and the renderers parse) instead of upstream's single ``.npy``
|
||||
base64 string.
|
||||
|
||||
Everything else delegates to upstream so we track future vLLM changes for free.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import AsyncGenerator, AsyncIterable
|
||||
from contextvars import ContextVar
|
||||
from collections.abc import AsyncGenerator
|
||||
from typing import Any
|
||||
|
||||
from vllm.entrypoints.generate.base.protocol import RequestResponseMetadata
|
||||
@@ -30,7 +24,6 @@ from vllm.entrypoints.scale_out.token_in_token_out.protocol import (
|
||||
GenerateRequest,
|
||||
GenerateResponse,
|
||||
GenerateResponseChoice,
|
||||
PlaceholderRangeInfo,
|
||||
)
|
||||
from vllm.entrypoints.scale_out.token_in_token_out.serving import ServingTokens
|
||||
from vllm.entrypoints.serve.engine.protocol import ErrorResponse
|
||||
@@ -47,27 +40,6 @@ class PrimeRlGenerateResponseChoice(GenerateResponseChoice):
|
||||
|
||||
class PrimeRlGenerateResponse(GenerateResponse):
|
||||
choices: list[PrimeRlGenerateResponseChoice]
|
||||
prompt_token_ids: list[int] | None = None
|
||||
mm_placeholders: dict[str, list[PlaceholderRangeInfo]] | None = None
|
||||
|
||||
|
||||
_response_mm_placeholders: ContextVar[dict[str, list[PlaceholderRangeInfo]] | None] = ContextVar(
|
||||
"response_mm_placeholders", default=None
|
||||
)
|
||||
|
||||
|
||||
def _extract_mm_placeholders(
|
||||
engine_input: Any,
|
||||
) -> dict[str, list[PlaceholderRangeInfo]] | None:
|
||||
if not isinstance(engine_input, dict) or engine_input.get("type") != "multimodal":
|
||||
return None
|
||||
return {
|
||||
modality: [
|
||||
PlaceholderRangeInfo(offset=placeholder.offset, length=placeholder.length)
|
||||
for placeholder in sorted(ranges, key=lambda placeholder: placeholder.offset)
|
||||
]
|
||||
for modality, ranges in engine_input["mm_placeholders"].items()
|
||||
}
|
||||
|
||||
|
||||
class _GenerateRoutedExpertsCapture(RoutedExpertsCapture):
|
||||
@@ -82,29 +54,8 @@ class _GenerateRoutedExpertsCapture(RoutedExpertsCapture):
|
||||
return PrimeRlGenerateResponse(**{**response.model_dump(exclude={"choices"}), "choices": choices})
|
||||
|
||||
|
||||
class _PromptTokenIdsCapture:
|
||||
def __init__(self, source: AsyncIterable[RequestOutput]) -> None:
|
||||
self._source = source
|
||||
self.prompt_token_ids: list[int] | None = None
|
||||
|
||||
async def __aiter__(self) -> AsyncGenerator[RequestOutput, None]:
|
||||
async for output in self._source:
|
||||
self.prompt_token_ids = output.prompt_token_ids
|
||||
yield output
|
||||
|
||||
|
||||
class PrimeRlServingTokens(ServingTokens):
|
||||
"""ServingTokens with Prime's remaining response and PD extensions."""
|
||||
|
||||
def _log_inputs(
|
||||
self,
|
||||
request_id: str,
|
||||
inputs: Any,
|
||||
params: Any,
|
||||
lora_request: Any,
|
||||
) -> None:
|
||||
_response_mm_placeholders.set(_extract_mm_placeholders(inputs))
|
||||
super()._log_inputs(request_id, inputs, params, lora_request)
|
||||
"""ServingTokens with compact routed experts."""
|
||||
|
||||
async def serve_tokens_full_generator( # type: ignore[override]
|
||||
self,
|
||||
@@ -122,22 +73,15 @@ class PrimeRlServingTokens(ServingTokens):
|
||||
)
|
||||
result_generator = routed_experts
|
||||
|
||||
prompt_capture = _PromptTokenIdsCapture(result_generator)
|
||||
response = await super().serve_tokens_full_generator(
|
||||
request,
|
||||
prompt_capture,
|
||||
result_generator,
|
||||
request_id,
|
||||
model_name,
|
||||
request_metadata,
|
||||
)
|
||||
|
||||
if not isinstance(response, GenerateResponse):
|
||||
return response
|
||||
|
||||
if routed_experts is not None:
|
||||
if routed_experts is not None and isinstance(response, GenerateResponse):
|
||||
response = routed_experts.post_process(response)
|
||||
else:
|
||||
response = PrimeRlGenerateResponse(**response.model_dump())
|
||||
response.prompt_token_ids = prompt_capture.prompt_token_ids
|
||||
response.mm_placeholders = _response_mm_placeholders.get()
|
||||
|
||||
return response
|
||||
|
||||
+142
-18
@@ -1,17 +1,22 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import fcntl
|
||||
import os
|
||||
import time
|
||||
from contextlib import contextmanager
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING, Any
|
||||
from typing import TYPE_CHECKING, Any, Callable, Iterator
|
||||
|
||||
import orjson
|
||||
import prime_runs as pr
|
||||
from prime_sandboxes import Config as PrimeConfig
|
||||
|
||||
from prime_rl.configs.monitors import PrimeEvalMonitorConfig, PrimeTrainMonitorConfig
|
||||
from prime_rl.configs.sft import SFTConfig
|
||||
from prime_rl.monitors.base import Kind, Monitor, Subset
|
||||
from prime_rl.utils.config import BaseConfig
|
||||
from prime_rl.utils.logger import get_logger
|
||||
from prime_rl.utils.pathing import get_platform_run_path
|
||||
from prime_rl.utils.utils import sanitize
|
||||
|
||||
@@ -28,12 +33,18 @@ FINISH_TIMEOUT = 60.0
|
||||
|
||||
def write_platform_record(output_dir: Path, record: dict[str, Any]) -> None:
|
||||
"""Leave the run's platform identity in the run directory for the dashboard's
|
||||
"view on platform" link (atomic replace: a reader never sees a torn file)."""
|
||||
"view on platform" link (atomic replace: a reader never sees a torn file).
|
||||
The tmp file is pid-suffixed: the trainer and the online-eval process
|
||||
share the run directory, and two writers sharing one tmp path can tear
|
||||
each other's staged file mid-write."""
|
||||
path = get_platform_run_path(output_dir)
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
tmp = path.with_suffix(".json.tmp")
|
||||
tmp.write_bytes(orjson.dumps(record, option=orjson.OPT_INDENT_2))
|
||||
tmp.replace(path)
|
||||
tmp = path.with_suffix(f".json.tmp.{os.getpid()}")
|
||||
try:
|
||||
tmp.write_bytes(orjson.dumps(record, option=orjson.OPT_INDENT_2))
|
||||
tmp.replace(path)
|
||||
finally:
|
||||
tmp.unlink(missing_ok=True)
|
||||
|
||||
|
||||
def read_platform_record(output_dir: Path) -> dict[str, Any] | None:
|
||||
@@ -41,6 +52,73 @@ def read_platform_record(output_dir: Path) -> dict[str, Any] | None:
|
||||
return orjson.loads(path.read_bytes()) if path.is_file() else None
|
||||
|
||||
|
||||
# Bounded wait for the record lock: a blocking flock(LOCK_EX) would stall the
|
||||
# async event-loop thread for as long as the other writer holds the lock.
|
||||
RECORD_LOCK_TIMEOUT = 10.0
|
||||
RECORD_LOCK_POLL = 0.05
|
||||
|
||||
|
||||
@contextmanager
|
||||
def _platform_record_lock(output_dir: Path) -> Iterator[None]:
|
||||
"""Cross-process read-modify-write lock for the platform record: the
|
||||
trainer and the online-eval process merge into the SAME run.json, and an
|
||||
unlocked read-modify-write lets one clobber the other's snapshot. POSIX
|
||||
flock on a sibling .lock file. The lock file is NEVER unlinked: a waiting
|
||||
writer can still hold the unlinked inode's lock while a new writer
|
||||
creates and locks a fresh file — two simultaneous "exclusive" locks and
|
||||
a lost merge; a stable lock inode is the whole guarantee. Acquisition is
|
||||
BOUNDED (`RECORD_LOCK_TIMEOUT`), retried with non-blocking flock so the
|
||||
async event-loop thread never blocks; `TimeoutError` past the bound.
|
||||
Storage errors that make locking impossible (e.g. ENOLCK) raise
|
||||
immediately instead of retrying."""
|
||||
path = get_platform_run_path(output_dir)
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
lock_path = path.with_suffix(path.suffix + ".lock")
|
||||
with open(lock_path, "a+b") as lock_file:
|
||||
deadline = time.monotonic() + RECORD_LOCK_TIMEOUT
|
||||
while True:
|
||||
try:
|
||||
fcntl.flock(lock_file.fileno(), fcntl.LOCK_EX | fcntl.LOCK_NB)
|
||||
break
|
||||
except BlockingIOError:
|
||||
if time.monotonic() >= deadline:
|
||||
raise TimeoutError(f"platform record lock at {lock_path} still held after {RECORD_LOCK_TIMEOUT}s")
|
||||
time.sleep(RECORD_LOCK_POLL)
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
fcntl.flock(lock_file.fileno(), fcntl.LOCK_UN)
|
||||
|
||||
|
||||
def _merge_platform_record(
|
||||
output_dir: Path,
|
||||
merge: Callable[[dict[str, Any]], dict[str, Any]],
|
||||
) -> None:
|
||||
"""Best-effort locked read-modify-write of the platform record: run
|
||||
`merge` on the current record under the record lock and atomically
|
||||
replace the file. The record only backs the dashboard's "view on
|
||||
platform" link, so a lock or storage failure (TimeoutError, ENOLCK, ...)
|
||||
is logged and SKIPPED, never fatal to training; the dashboard just misses
|
||||
the link for that run."""
|
||||
try:
|
||||
with _platform_record_lock(output_dir):
|
||||
write_platform_record(output_dir, merge(read_platform_record(output_dir) or {}))
|
||||
except OSError:
|
||||
get_logger().warning(
|
||||
f"Failed to persist the platform record at {get_platform_run_path(output_dir)} "
|
||||
f"(lock or storage error); the dashboard's platform link may be missing. "
|
||||
f"Training continues."
|
||||
)
|
||||
|
||||
|
||||
def update_platform_record(output_dir: Path, update: dict[str, Any]) -> None:
|
||||
"""Best-effort locked read-modify-write of the platform record: `update`
|
||||
overlays the current record (preserving keys it doesn't set). Use for
|
||||
every writer that shares the file — a naive overwrite drops concurrent
|
||||
writers' keys."""
|
||||
_merge_platform_record(output_dir, lambda record: {**record, **update})
|
||||
|
||||
|
||||
def _base_url() -> str | None:
|
||||
"""$PRIME_API_BASE historically points at the RFT API root (``.../api/v1/rft``);
|
||||
the SDK takes the platform base URL. Unset means the SDK resolves it."""
|
||||
@@ -54,8 +132,12 @@ class PrimeTrainMonitor(Monitor):
|
||||
The run handle owns what ``TrainRun`` used to do by hand: the RFT
|
||||
lifecycle (register or attach, finalize), the per-step metrics POSTs, the
|
||||
every-10th-step Parquet sample uploads (presign -> PUT -> confirm), and
|
||||
the terminal status — a process that exits without finalizing is reported
|
||||
crashed by the SDK's atexit hook, replacing the old ``_mark_failed`` one.
|
||||
the terminal status. Delivery is BEST-EFFORT: the SDK's atexit hook
|
||||
reports a process that exits without finalizing, but an abrupt kill
|
||||
(SIGKILL, OOM, node loss) skips the hook and a lost finalize is not
|
||||
retried here — the platform owns the terminal state of attached
|
||||
($RUN_ID) and managed runs. `FINISH_TIMEOUT` bounds the queued-upload
|
||||
drain, not the SDK's finalize HTTP retries.
|
||||
|
||||
``init``/``finish`` do network I/O and run in worker threads; the log
|
||||
calls are queue puts onto the SDK's uploader thread, which owns retries
|
||||
@@ -69,9 +151,25 @@ class PrimeTrainMonitor(Monitor):
|
||||
init_kwargs: dict[str, Any]
|
||||
if run_id := os.getenv("RUN_ID"):
|
||||
# A managed launch pre-created the platform run and injected its id -
|
||||
# attach instead of registering a duplicate. The backend owns the run's
|
||||
# failure marking then; a clean finish() still marks it completed.
|
||||
# attach instead of registering a duplicate. The platform owns the
|
||||
# attached run's failure/completion marking; a clean finish() is
|
||||
# delivered best-effort and does not by itself mark it completed.
|
||||
init_kwargs = {"id": run_id}
|
||||
elif isinstance(config, SFTConfig):
|
||||
# SFT trains on a dataset, not on environments, and has no rollouts - the
|
||||
# platform run is registered without both.
|
||||
init_kwargs = dict(
|
||||
name=self.config.name,
|
||||
model=config.model.name,
|
||||
environments=[],
|
||||
training=pr.TrainingSpec(
|
||||
max_steps=config.max_steps or 0,
|
||||
batch_size=config.data.batch_size,
|
||||
seq_len=config.data.seq_len,
|
||||
wandb_project=config.monitors.wandb.project if config.monitors.wandb else None,
|
||||
),
|
||||
config=config.model_dump(exclude_none=True, mode="json"),
|
||||
)
|
||||
elif config is not None:
|
||||
init_kwargs = dict(
|
||||
name=self.config.name,
|
||||
@@ -107,7 +205,15 @@ class PrimeTrainMonitor(Monitor):
|
||||
attached = " (attached via $RUN_ID)" if self.run.attached else ""
|
||||
self.logger.info(f"Logging metrics and episodes to platform run {self.run.id} ({self.run.url}){attached}")
|
||||
if output_dir is not None:
|
||||
write_platform_record(output_dir, {"kind": "train", "id": self.run.id, "url": self.run.url})
|
||||
# Merge, not overwrite: a concurrent eval process (SFT
|
||||
# online evals share the trainer's run dir) may already
|
||||
# have written its evaluations record. Off the event
|
||||
# loop: the flock retry must not stall it.
|
||||
await asyncio.to_thread(
|
||||
update_platform_record,
|
||||
output_dir,
|
||||
{"kind": "train", "id": self.run.id, "url": self.run.url},
|
||||
)
|
||||
else:
|
||||
self.logger.info(f"Platform run disabled ({pr.MODE_ENV}=disabled)")
|
||||
|
||||
@@ -170,7 +276,19 @@ class PrimeEvalMonitor(Monitor):
|
||||
if self.mode == "online":
|
||||
self.logger.info("Streaming eval epochs to the Prime platform")
|
||||
if output_dir is not None:
|
||||
write_platform_record(output_dir, {"kind": "eval", "run_id": self.run_id, "evaluations": {}})
|
||||
# Merge, not overwrite: when the eval process shares the
|
||||
# trainer's run dir (SFT online evals), the train record's
|
||||
# platform link (kind/id/url) must survive; a standalone
|
||||
# eval keeps the plain eval-shaped record. Locked RMW.
|
||||
def _eval_init_update(record: dict[str, Any]) -> dict[str, Any]:
|
||||
if record.get("kind") == "train":
|
||||
record.setdefault("evaluations", {})
|
||||
record["run_id"] = self.run_id
|
||||
return record
|
||||
return {"kind": "eval", "run_id": self.run_id, "evaluations": {}}
|
||||
|
||||
# Off the event loop: the flock retry must not stall it.
|
||||
await asyncio.to_thread(_merge_platform_record, output_dir, _eval_init_update)
|
||||
else:
|
||||
self.logger.info(f"Platform evaluations disabled ({pr.MODE_ENV}=disabled)")
|
||||
|
||||
@@ -229,13 +347,19 @@ class PrimeEvalMonitor(Monitor):
|
||||
attached = f" (attached via ${EVAL_ID_VAR})" if run.attached else ""
|
||||
self.logger.info(f"Streaming {env_name} (Step {step}) evaluation - {run.url}{attached}")
|
||||
if self.output_dir is not None:
|
||||
record = read_platform_record(self.output_dir) or {
|
||||
"kind": "eval",
|
||||
"run_id": self.run_id,
|
||||
"evaluations": {},
|
||||
}
|
||||
record["evaluations"][env_name] = {"step": step, "id": run.id, "url": run.url}
|
||||
write_platform_record(self.output_dir, record)
|
||||
|
||||
def _eval_epoch_update(record: dict[str, Any]) -> dict[str, Any]:
|
||||
record.setdefault("kind", "eval")
|
||||
record.setdefault("run_id", self.run_id)
|
||||
record.setdefault("evaluations", {})[env_name] = {
|
||||
"step": step,
|
||||
"id": run.id,
|
||||
"url": run.url,
|
||||
}
|
||||
return record
|
||||
|
||||
# Off the event loop: the flock retry must not stall it.
|
||||
await asyncio.to_thread(_merge_platform_record, self.output_dir, _eval_epoch_update)
|
||||
return run
|
||||
|
||||
async def log_eval_plan(self, env_name: str, step: int, expected: int) -> None:
|
||||
|
||||
@@ -80,6 +80,7 @@ def train(config: SFTConfig):
|
||||
monitors.setup(
|
||||
producer="trainer",
|
||||
wandb=config.monitors.wandb,
|
||||
prime=config.monitors.prime,
|
||||
file=config.monitors.file,
|
||||
output_dir=config.run_dir,
|
||||
run_config=config,
|
||||
@@ -676,6 +677,7 @@ def train(config: SFTConfig):
|
||||
|
||||
logger.info(f"Peak memory: {max_peak_memory:.1f} GiB")
|
||||
logger.success("SFT trainer finished")
|
||||
asyncio.run(monitors.finalize())
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@@ -17,14 +17,13 @@ import pybase64
|
||||
from vllm.entrypoints.scale_out.token_in_token_out.protocol import (
|
||||
GenerateResponse,
|
||||
GenerateResponseChoice,
|
||||
PlaceholderRangeInfo,
|
||||
)
|
||||
from vllm.entrypoints.serve.engine.protocol import UsageInfo
|
||||
from vllm.multimodal.inputs import PlaceholderRange
|
||||
|
||||
from prime_rl.inference.vllm.routed_experts import serialize_routed_experts
|
||||
from prime_rl.inference.vllm.serving_tokens import (
|
||||
PrimeRlServingTokens,
|
||||
_extract_mm_placeholders,
|
||||
_GenerateRoutedExpertsCapture,
|
||||
)
|
||||
|
||||
@@ -79,16 +78,11 @@ def test_generate_response_post_process_preserves_prompt_metadata():
|
||||
)
|
||||
],
|
||||
usage=usage,
|
||||
prompt_token_ids=[10, 11, 12, 13],
|
||||
mm_placeholders={"image": [PlaceholderRangeInfo(offset=1, length=2)]},
|
||||
)
|
||||
|
||||
processed = capture.post_process(response)
|
||||
processed.prompt_token_ids = [10, 11, 12, 13]
|
||||
processed.mm_placeholders = _extract_mm_placeholders(
|
||||
{
|
||||
"type": "multimodal",
|
||||
"mm_placeholders": {"image": [PlaceholderRange(offset=1, length=2)]},
|
||||
}
|
||||
)
|
||||
|
||||
assert processed.choices[0].routed_experts == compact_routed_experts
|
||||
assert processed.model == "test-model"
|
||||
|
||||
@@ -451,8 +451,7 @@ def test_deepseek_v4_init_buffers_post_meta_restores_every_rotary():
|
||||
#
|
||||
# `precompute_freqs_cis` (`model.py:206-235`) applies the NTK-by-parts ramp only when
|
||||
# `original_seq_len > 0`, so a pure sliding-window layer gets plain RoPE at `rope_theta` and every
|
||||
# compressed layer gets YaRN at `compress_rope_theta`. vLLM's `build_deepseek_v4_rope` branches the
|
||||
# base but not the scaling, which `monkey_patch_deepseek_v4_per_layer_rope` corrects.
|
||||
# compressed layer gets YaRN at `compress_rope_theta`. vLLM's `build_deepseek_v4_rope` must match.
|
||||
#
|
||||
# The real checkpoint's beta range and factor, but a reduced `original_max_position_embeddings`:
|
||||
# the cos/sin cache is `original_max * factor` rows of fp32, which at the checkpoint's 65536 would
|
||||
@@ -474,13 +473,15 @@ ROPE_SCALING = {
|
||||
}
|
||||
|
||||
# The nested `main`/`compress` schema, which HF's own `DeepseekV4Config` and this repo's port both
|
||||
# write and which vLLM's config shim cannot read. A config.json can also carry the flat legacy
|
||||
# `rope_scaling` the real checkpoint ships, or no YaRN parameters at all; the nested scaled form
|
||||
# is asserted here because it is the one the patch has the most normalization to do on.
|
||||
# write. A config.json can also carry the flat legacy `rope_scaling` the real checkpoint ships.
|
||||
ROPE_NESTED_PLAIN = {"rope_type": "default", "partial_rotary_factor": 0.125}
|
||||
ROPE_PARAMETERS = {
|
||||
"main": dict(ROPE_NESTED_PLAIN),
|
||||
"compress": {**ROPE_SCALING, "partial_rotary_factor": 0.125},
|
||||
"compress": {
|
||||
"rope_type": "yarn",
|
||||
**{key: value for key, value in ROPE_SCALING.items() if key != "type"},
|
||||
"partial_rotary_factor": 0.125,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -522,12 +523,11 @@ def _vllm_rope_freqs(rotary_emb) -> torch.Tensor:
|
||||
|
||||
@pytest.fixture
|
||||
def vllm_rope_builder():
|
||||
"""`build_deepseek_v4_rope`, patched, under the live vLLM config its `CustomOp` base asserts on.
|
||||
"""`build_deepseek_v4_rope` under the live vLLM config its `CustomOp` base asserts on.
|
||||
|
||||
The builder is resolved off the module at call time rather than bound at import, because the
|
||||
patch rebinds that attribute. The config goes through vLLM's own `patch_rope_parameters`, the
|
||||
same normalization the engine runs: it renames the legacy `type` key and, for the nested
|
||||
schema, injects a top-level `rope_type="default"` beside the sub-dicts.
|
||||
The config goes through vLLM's own `patch_rope_parameters`, the same normalization the engine
|
||||
runs: it renames the legacy `type` key and, for the nested schema, injects a top-level
|
||||
`rope_type="default"` beside the sub-dicts.
|
||||
"""
|
||||
from vllm.config import VllmConfig, set_current_vllm_config
|
||||
from vllm.model_executor.layers import rotary_embedding
|
||||
@@ -536,9 +536,6 @@ def vllm_rope_builder():
|
||||
from vllm.transformers_utils.configs.deepseek_v4 import DeepseekV4Config as VllmDeepseekV4Config
|
||||
from vllm.utils.torch_utils import set_default_torch_dtype
|
||||
|
||||
from prime_rl.inference.patches import monkey_patch_deepseek_v4_per_layer_rope
|
||||
|
||||
monkey_patch_deepseek_v4_per_layer_rope()
|
||||
rotary_embedding._ROPE_DICT.clear()
|
||||
|
||||
def build(compress_ratio: int):
|
||||
|
||||
@@ -0,0 +1,339 @@
|
||||
"""The SFT trainer's platform wiring: registration shape and monitor fan-out.
|
||||
|
||||
``monitors.prime`` on ``SFTConfig`` must register the run with the dataset-batched
|
||||
training fields (no environments, no rollouts) and flow the trainer's metrics and
|
||||
finalize through the registered ``PrimeTrainMonitor`` like the RL orchestrator does.
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
from types import SimpleNamespace
|
||||
|
||||
import pytest
|
||||
|
||||
from prime_rl import monitors
|
||||
from prime_rl.configs.monitors import (
|
||||
EvalMonitorsConfig,
|
||||
FileMonitorConfig,
|
||||
PrimeEvalMonitorConfig,
|
||||
PrimeTrainMonitorConfig,
|
||||
TrainMonitorsConfig,
|
||||
WandbMonitorConfig,
|
||||
)
|
||||
from prime_rl.configs.sft import SFTConfig
|
||||
from prime_rl.monitors.prime import PrimeTrainMonitor
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def prime_init(monkeypatch):
|
||||
"""Replace the ``prime_runs`` SDK entry point with one that records its kwargs."""
|
||||
calls = []
|
||||
|
||||
def fake_init(**kwargs):
|
||||
calls.append(kwargs)
|
||||
return SimpleNamespace(
|
||||
id="run-123",
|
||||
url="https://platform/training/run-123",
|
||||
attached=False,
|
||||
finished=False,
|
||||
finish=lambda *args, **kwargs_: None,
|
||||
log_metrics=lambda *args, **kwargs_: None,
|
||||
log_episodes=lambda *args, **kwargs_: None,
|
||||
)
|
||||
|
||||
monkeypatch.setattr("prime_rl.monitors.prime.pr.init", fake_init)
|
||||
monkeypatch.delenv("RUN_ID", raising=False)
|
||||
return calls
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def clear_monitors():
|
||||
"""``monitors.setup`` registers into a module-global list; empty it after each test."""
|
||||
yield
|
||||
monitors.MONITORS.clear()
|
||||
|
||||
|
||||
def _sft_config(overrides: dict | None = None) -> SFTConfig:
|
||||
config = {
|
||||
"model": {"name": "PrimeIntellect/Qwen3-0.6B"},
|
||||
"data": {"type": "fake", "batch_size": 8, "seq_len": 64},
|
||||
"max_steps": 10,
|
||||
}
|
||||
if overrides:
|
||||
config.update(overrides)
|
||||
return SFTConfig.model_validate(config)
|
||||
|
||||
|
||||
def test_sft_prime_monitor_name_inherits_run_name():
|
||||
config = _sft_config({"monitors": {"prime": {}}})
|
||||
|
||||
assert config.monitors.prime.name == config.run.name
|
||||
|
||||
|
||||
def test_sft_prime_monitor_keeps_explicit_name():
|
||||
config = _sft_config({"monitors": {"prime": {"name": "my-experiment"}}})
|
||||
|
||||
assert config.monitors.prime.name == "my-experiment"
|
||||
|
||||
|
||||
def test_sft_registers_dataset_training_fields(prime_init):
|
||||
config = _sft_config({"monitors": {"prime": {}}})
|
||||
|
||||
asyncio.run(PrimeTrainMonitor(config.monitors.prime).init(config=config, output_dir=None))
|
||||
|
||||
(call,) = prime_init
|
||||
assert call["kind"] == "train"
|
||||
assert call["name"] == config.run.name
|
||||
assert call["model"] == "PrimeIntellect/Qwen3-0.6B"
|
||||
# SFT trains on a dataset: no environments, no rollouts per example
|
||||
assert call["environments"] == []
|
||||
assert call["training"].max_steps == 10
|
||||
assert call["training"].batch_size == 8
|
||||
assert call["training"].seq_len == 64
|
||||
assert call["training"].rollouts_per_example is None
|
||||
assert call["config"]["model"]["name"] == "PrimeIntellect/Qwen3-0.6B"
|
||||
|
||||
|
||||
def test_sft_registers_wandb_project(prime_init):
|
||||
config = _sft_config(
|
||||
{
|
||||
"monitors": {
|
||||
"wandb": {"project": "sft-tests"},
|
||||
"prime": {},
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
asyncio.run(PrimeTrainMonitor(config.monitors.prime).init(config=config, output_dir=None))
|
||||
|
||||
assert prime_init[0]["training"].wandb_project == "sft-tests"
|
||||
|
||||
|
||||
def test_online_eval_monitors_switch_prime_flavor():
|
||||
"""The online-eval process parses EvalMonitorsConfig, whose ``prime`` field is the
|
||||
evaluation flavor - the launcher converts the trainer's TrainMonitorsConfig."""
|
||||
from prime_rl.entrypoints.sft import build_online_eval_monitors
|
||||
|
||||
monitors = build_online_eval_monitors(
|
||||
TrainMonitorsConfig(
|
||||
wandb=WandbMonitorConfig(project="sft-tests"),
|
||||
file=FileMonitorConfig(),
|
||||
prime=PrimeTrainMonitorConfig(name="my-run"),
|
||||
)
|
||||
)
|
||||
|
||||
assert isinstance(monitors, EvalMonitorsConfig)
|
||||
assert isinstance(monitors.prime, PrimeEvalMonitorConfig)
|
||||
assert monitors.prime.name == "my-run"
|
||||
assert monitors.wandb.project == "sft-tests"
|
||||
|
||||
# Without a platform run the evals process gets no platform monitor either
|
||||
bare = build_online_eval_monitors(TrainMonitorsConfig())
|
||||
assert bare.prime is None
|
||||
|
||||
|
||||
def test_sft_setup_registers_prime_monitor(prime_init, tmp_path, clear_monitors):
|
||||
config = _sft_config({"monitors": {"prime": {}}})
|
||||
|
||||
asyncio.run(
|
||||
monitors.setup(
|
||||
prime=config.monitors.prime,
|
||||
output_dir=tmp_path,
|
||||
run_config=config,
|
||||
)
|
||||
)
|
||||
|
||||
assert monitors.get(PrimeTrainMonitor) is not None
|
||||
|
||||
# The trainer's per-step metrics fan out to the platform run, and finalize
|
||||
# closes it out (drains the SDK's upload queue).
|
||||
asyncio.run(monitors.log({"loss/mean": 1.0, "step": 1}, step=1))
|
||||
asyncio.run(monitors.log({"val/loss": 0.5, "step": 1}, step=1))
|
||||
asyncio.run(monitors.finalize())
|
||||
|
||||
|
||||
def test_online_eval_config_keeps_prime_monitor():
|
||||
"""SFTOnlineEvalConfig.monitors must be EvalMonitorsConfig so the
|
||||
launcher-converted PrimeEvalMonitorConfig survives the eval.json
|
||||
dump/re-parse boundary (base MonitorsConfig drops/forbids prime)."""
|
||||
from prime_rl.configs.eval import SFTOnlineEvalConfig
|
||||
from prime_rl.configs.monitors import EvalMonitorsConfig, PrimeEvalMonitorConfig
|
||||
from prime_rl.entrypoints.sft import build_online_eval_monitors
|
||||
|
||||
field = SFTOnlineEvalConfig.model_fields["monitors"]
|
||||
assert field.annotation is EvalMonitorsConfig
|
||||
|
||||
train_monitors = TrainMonitorsConfig.model_validate({"prime": {"name": "r1"}})
|
||||
eval_monitors = build_online_eval_monitors(train_monitors)
|
||||
assert isinstance(eval_monitors.prime, PrimeEvalMonitorConfig)
|
||||
assert eval_monitors.prime.name == "r1"
|
||||
|
||||
# The online-eval process passes the prime monitor to monitors.setup
|
||||
# (src/prime_rl/eval/online.py) — same wiring as the standalone eval
|
||||
# entrypoint. Read the source text (importing the module pulls torch,
|
||||
# which this torch-free test env deliberately lacks).
|
||||
from pathlib import Path
|
||||
|
||||
import prime_rl
|
||||
|
||||
online_src = Path(prime_rl.__path__[0], "eval", "online.py").read_text()
|
||||
assert "prime=config.monitors.prime" in online_src
|
||||
|
||||
|
||||
def test_online_eval_shares_trainer_run_dir_and_merges_records(tmp_path):
|
||||
"""The online-eval process shares the trainer's run dir (the dashboard
|
||||
reads its file-monitor artifacts from there), and the platform records
|
||||
MERGE instead of clobbering each other: the trainer's kind="train"
|
||||
link survives with the eval process's evaluations riding along."""
|
||||
from prime_rl.entrypoints.sft import build_online_eval_config
|
||||
from prime_rl.monitors.prime import (
|
||||
read_platform_record,
|
||||
write_platform_record,
|
||||
)
|
||||
|
||||
config = _sft_config(
|
||||
{
|
||||
"eval": {
|
||||
"interval": 50,
|
||||
"source": [
|
||||
{
|
||||
"name": "rev",
|
||||
"env": {"taskset": {"id": "harbor"}},
|
||||
}
|
||||
],
|
||||
},
|
||||
"inference": {},
|
||||
}
|
||||
)
|
||||
eval_config = build_online_eval_config(config)
|
||||
# Same run dir: dashboard visibility for the eval artifacts.
|
||||
assert eval_config.output_dir == config.run_dir
|
||||
assert eval_config.broadcasts_dir != eval_config.output_dir
|
||||
|
||||
# Simulate the trainer's record, then the eval process merging on top.
|
||||
write_platform_record(tmp_path, {"kind": "train", "id": "run-1", "url": "https://x/run-1"})
|
||||
record = read_platform_record(tmp_path) or {}
|
||||
if record.get("kind") == "train":
|
||||
record.setdefault("evaluations", {})
|
||||
record["run_id"] = "run-1"
|
||||
else:
|
||||
record = {"kind": "eval", "run_id": "run-1", "evaluations": {}}
|
||||
record.setdefault("evaluations", {})["rev"] = {"step": 5, "id": "ev-1", "url": "https://x/ev-1"}
|
||||
write_platform_record(tmp_path, record)
|
||||
merged = read_platform_record(tmp_path)
|
||||
assert merged["kind"] == "train" # the train link survives
|
||||
assert merged["id"] == "run-1"
|
||||
assert merged["evaluations"]["rev"]["id"] == "ev-1"
|
||||
|
||||
|
||||
def test_platform_record_lock_keeps_a_stable_inode(tmp_path):
|
||||
"""The record lock must NEVER unlink its lock file: a writer waiting on
|
||||
the flock can still hold the unlinked inode's lock while a later writer
|
||||
creates and locks a fresh file - two simultaneous "exclusive" locks and
|
||||
a lost merge. The lock file must persist with the SAME inode across
|
||||
acquisitions, and the locked update helper must merge two sequential
|
||||
writers into one record. (Interprocess contention is exercised by the
|
||||
two-process update_platform_record probe; here the writers are
|
||||
sequential.)"""
|
||||
import os
|
||||
|
||||
from prime_rl.monitors.prime import _platform_record_lock, update_platform_record
|
||||
from prime_rl.utils.pathing import get_platform_run_path
|
||||
|
||||
lock_path = get_platform_run_path(tmp_path).with_suffix(".json.lock")
|
||||
inodes = []
|
||||
for _ in range(2):
|
||||
with _platform_record_lock(tmp_path):
|
||||
# The lock file exists DURING the critical section, always.
|
||||
assert lock_path.is_file()
|
||||
inodes.append(os.stat(lock_path).st_ino)
|
||||
|
||||
# The lock file SURVIVES release, and every acquisition locked the same inode.
|
||||
assert lock_path.is_file()
|
||||
assert len(set(inodes)) == 1
|
||||
|
||||
# Two sequential locked updates merge instead of clobbering.
|
||||
update_platform_record(tmp_path, {"kind": "train", "id": "run-1", "url": "https://x/run-1"})
|
||||
update_platform_record(tmp_path, {"evaluations": {"rev": {"step": 5, "id": "ev-1", "url": "https://x/ev-1"}}})
|
||||
from prime_rl.monitors.prime import read_platform_record
|
||||
|
||||
record = read_platform_record(tmp_path)
|
||||
assert record["kind"] == "train"
|
||||
assert record["id"] == "run-1"
|
||||
assert record["evaluations"]["rev"]["id"] == "ev-1"
|
||||
|
||||
|
||||
def test_record_persistence_runs_off_the_event_loop(prime_init, tmp_path, monkeypatch):
|
||||
"""The record merge (bounded flock retry included) must run in a worker
|
||||
thread via asyncio.to_thread, not on the event loop thread: contention
|
||||
for the full lock bound would otherwise freeze the loop."""
|
||||
import threading
|
||||
from pathlib import Path
|
||||
|
||||
import prime_rl.monitors.prime as prime_module
|
||||
|
||||
seen_threads = []
|
||||
real_merge = prime_module._merge_platform_record
|
||||
|
||||
def spy(output_dir, merge):
|
||||
seen_threads.append(threading.get_ident())
|
||||
return real_merge(output_dir, merge)
|
||||
|
||||
monkeypatch.setattr(prime_module, "_merge_platform_record", spy)
|
||||
|
||||
config = _sft_config({"monitors": {"prime": {}}})
|
||||
asyncio.run(PrimeTrainMonitor(config.monitors.prime).init(config=config, output_dir=tmp_path))
|
||||
|
||||
assert seen_threads, "the record merge never ran"
|
||||
assert threading.get_ident() not in seen_threads, "record merge ran on the caller thread"
|
||||
|
||||
# All three async write sites (train init, eval init, eval epoch) go
|
||||
# through to_thread; only the sync helper stays callable directly.
|
||||
import re
|
||||
|
||||
import prime_rl
|
||||
|
||||
src = Path(prime_rl.__path__[0], "monitors", "prime.py").read_text()
|
||||
assert len(re.findall(r"asyncio\.to_thread\(\s*_merge_platform_record", src)) == 2
|
||||
assert re.search(r"asyncio\.to_thread\(\s*update_platform_record", src)
|
||||
|
||||
from prime_rl.monitors.prime import read_platform_record
|
||||
|
||||
record = read_platform_record(tmp_path)
|
||||
assert record["kind"] == "train"
|
||||
assert record["id"] == "run-123"
|
||||
|
||||
|
||||
def test_platform_record_lock_acquisition_is_bounded(tmp_path, monkeypatch):
|
||||
"""flock(LOCK_EX) must never block the event-loop thread indefinitely:
|
||||
while another process holds the lock, acquisition retries
|
||||
non-blockingly and raises TimeoutError past the bound instead of
|
||||
hanging."""
|
||||
import fcntl
|
||||
|
||||
import prime_rl.monitors.prime as prime_module
|
||||
|
||||
monkeypatch.setattr(prime_module, "RECORD_LOCK_TIMEOUT", 0.2)
|
||||
lock_path = prime_module.get_platform_run_path(tmp_path).with_suffix(".json.lock")
|
||||
lock_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
with open(lock_path, "a+b") as held:
|
||||
fcntl.flock(held.fileno(), fcntl.LOCK_EX)
|
||||
with pytest.raises(TimeoutError, match="still held"):
|
||||
with prime_module._platform_record_lock(tmp_path):
|
||||
pass
|
||||
|
||||
|
||||
def test_platform_record_persistence_is_best_effort(tmp_path, monkeypatch):
|
||||
"""A storage failure on the OPTIONAL dashboard record (e.g. ENOLCK on a
|
||||
filesystem without flock support) must not abort training: the write is
|
||||
skipped with a warning, and no record is left behind."""
|
||||
import errno
|
||||
|
||||
import prime_rl.monitors.prime as prime_module
|
||||
|
||||
def enolck(fd, op):
|
||||
raise OSError(errno.ENOLCK, "No locks available")
|
||||
|
||||
monkeypatch.setattr(prime_module.fcntl, "flock", enolck)
|
||||
# Must not raise: the platform record is best-effort.
|
||||
prime_module.update_platform_record(tmp_path, {"kind": "train", "id": "run-1", "url": "https://x/run-1"})
|
||||
assert prime_module.read_platform_record(tmp_path) is None
|
||||
@@ -151,7 +151,7 @@ members = [
|
||||
overrides = [
|
||||
{ name = "apache-tvm-ffi", specifier = "==0.1.11" },
|
||||
{ name = "nvidia-cudnn-cu13", marker = "sys_platform == 'linux'", specifier = ">=9.15" },
|
||||
{ name = "nvidia-cutlass-dsl", specifier = "==4.6.2" },
|
||||
{ name = "nvidia-cutlass-dsl", specifier = "==4.7.1" },
|
||||
{ name = "openenv-core" },
|
||||
{ name = "tilelang", specifier = "==0.1.12" },
|
||||
{ name = "torch", marker = "sys_platform != 'linux'", specifier = ">=2.13.0" },
|
||||
@@ -176,8 +176,8 @@ requires-dist = ["nixl-cu13==0.10.1"]
|
||||
|
||||
[[manifest.dependency-metadata]]
|
||||
name = "nvidia-cutlass-dsl"
|
||||
version = "4.6.2"
|
||||
requires-dist = ["nvidia-cutlass-dsl-libs-base==4.6.2", "nvidia-cutlass-dsl-libs-cu13==4.6.2"]
|
||||
version = "4.7.1"
|
||||
requires-dist = ["nvidia-cutlass-dsl-libs-base==4.7.1", "nvidia-cutlass-dsl-libs-cu13==4.7.1"]
|
||||
|
||||
[[package]]
|
||||
name = "absl-py"
|
||||
@@ -563,7 +563,7 @@ dependencies = [
|
||||
{ name = "google-search-results" },
|
||||
{ name = "html2text" },
|
||||
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "mistralai" },
|
||||
{ name = "mpmath" },
|
||||
{ name = "networkx" },
|
||||
@@ -1263,7 +1263,7 @@ dependencies = [
|
||||
{ name = "fsspec", extra = ["http"] },
|
||||
{ name = "httpx" },
|
||||
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "multiprocess" },
|
||||
{ name = "numpy" },
|
||||
{ name = "packaging" },
|
||||
@@ -1396,7 +1396,7 @@ version = "0.1.0"
|
||||
source = { editable = "deps/prime-envs/environments/reasoning/deshuffle_papers" }
|
||||
dependencies = [
|
||||
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "verifiers" },
|
||||
]
|
||||
|
||||
@@ -1527,7 +1527,7 @@ version = "0.1.0"
|
||||
source = { editable = "deps/prime-envs/environments/science/drug_discovery_bench" }
|
||||
dependencies = [
|
||||
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "verifiers", extra = ["harbor"] },
|
||||
]
|
||||
|
||||
@@ -1858,7 +1858,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "flashinfer-python"
|
||||
version = "0.6.18"
|
||||
version = "0.6.18.post1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "apache-tvm-ffi" },
|
||||
@@ -1878,9 +1878,9 @@ dependencies = [
|
||||
{ name = "torch", version = "2.13.0+cu130", source = { registry = "https://download.pytorch.org/whl/cu130" } },
|
||||
{ name = "tqdm" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/3e/72/12066c5f42a49e7eabe6ec445ac73c59785480bba1b763bd7e0a512f13c1/flashinfer_python-0.6.18.tar.gz", hash = "sha256:70a2074d78cb17ed39c98e5ed47f626c6e8bb29015cf028c49cbf8f2629405a1", size = 13286160, upload-time = "2026-08-29T02:09:18.376Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/ad/7e/a756567c193b2af546f98c08158505e998c2dd4a7f8fc6fe6c72105dce8b/flashinfer_python-0.6.18.post1.tar.gz", hash = "sha256:1ebfb8ff3fa3a896e5abbd0dec123a5f3e3734029871349dad6968b252b82097", size = 13294037, upload-time = "2026-09-05T03:26:09.049Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/31/7d/3dae45fc293cd5f16cefe4dcf59683d964ca8faf2303ed7fff54f4bca490/flashinfer_python-0.6.18-py3-none-any.whl", hash = "sha256:d5d26edb48f8def0bf28b2c94415aef7f0754e2cd9e3cb3d6e7081262d068aad", size = 18347767, upload-time = "2026-08-29T02:09:15.868Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/64/3f/bd0a74bfbb4f3813bfe61267ff696fb229ab70c0f1f44848287221928c95/flashinfer_python-0.6.18.post1-py3-none-any.whl", hash = "sha256:adb6d2952b47131138e108bd2999b1fe18b71f1a4c0b2684f168753db9563991", size = 18348022, upload-time = "2026-09-05T03:26:06.084Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2014,6 +2014,12 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/a0/61/5c78b91c3143ed5c14207f463aecfc8f9dbb5092fb2869baf37c273b2705/gitdb-4.0.12-py3-none-any.whl", hash = "sha256:67073e15955400952c6565cc3e707c554a4eea2e428946f7a4c162fab9bd9bcf", size = 62794, upload-time = "2025-01-02T07:20:43.624Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gitignore-parser"
|
||||
version = "0.1.13"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/e5/51/e391a1a4238f18d0abb47be479b07af265ad4519022cf51b7da47ef82487/gitignore_parser-0.1.13.tar.gz", hash = "sha256:c7e10c8190accb8ae57fb3711889e73a9c0dbc04d4222b91ace8a4bf64d2f746", size = 5603, upload-time = "2025-08-25T06:33:22.704Z" }
|
||||
|
||||
[[package]]
|
||||
name = "gitpython"
|
||||
version = "3.1.50"
|
||||
@@ -2386,7 +2392,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "huggingface-hub"
|
||||
version = "1.28.0"
|
||||
version = "1.32.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
resolution-markers = [
|
||||
"platform_machine == 'x86_64' and sys_platform == 'linux'",
|
||||
@@ -2403,9 +2409,9 @@ dependencies = [
|
||||
{ name = "tqdm" },
|
||||
{ name = "typing-extensions" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/c6/ae/222a91937ebee7f62c0ca8f5ee0afd97577caf24c0abb927d1f5c7e9f6d2/huggingface_hub-1.28.0.tar.gz", hash = "sha256:46a2e950c09234de54093d587d1675382f0d08dbd600d9fb599b5932f5b2c6cb", size = 959609, upload-time = "2026-08-18T12:27:15.101Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/fe/0f/e83fdd856da8fca26bf78d71709ebd120432a0ce535e72b9597cab1eb5bf/huggingface_hub-1.32.0.tar.gz", hash = "sha256:ed70a45498abe86039df7c2f4e5f7575de524be908d3840e8f828d5525eafd6a", size = 1038662, upload-time = "2026-09-17T10:27:48.049Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/51/0e/eafef18f1a75e125e68395db21131db0cf868a128ecd2fce69b4df6c584b/huggingface_hub-1.28.0-py3-none-any.whl", hash = "sha256:58a8bacb03072edfc38067065e9dc24bbb34805410fcd36a1632de0b329660bb", size = 793202, upload-time = "2026-08-18T12:27:12.719Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1b/cf/d98dd561d6d0d7b7d7a64d1563f8aaaa7c235daee41c1c9bcc3da62420ed/huggingface_hub-1.32.0-py3-none-any.whl", hash = "sha256:b0c7c80561969d9cdacdd55fce67ba9584cca0b9d4ea80957a3a5c1445fac5c8", size = 842906, upload-time = "2026-09-17T10:27:46.102Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3081,7 +3087,7 @@ version = "0.1.0"
|
||||
source = { editable = "deps/prime-envs/environments/code/livecodebench" }
|
||||
dependencies = [
|
||||
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "verifiers" },
|
||||
]
|
||||
|
||||
@@ -3587,7 +3593,7 @@ version = "0.3.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "grpcio" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" } },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" } },
|
||||
{ name = "nixl" },
|
||||
{ name = "numpy" },
|
||||
{ name = "protobuf" },
|
||||
@@ -4099,19 +4105,19 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "nvidia-cutlass-dsl"
|
||||
version = "4.6.2"
|
||||
version = "4.7.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "nvidia-cutlass-dsl-libs-base" },
|
||||
{ name = "nvidia-cutlass-dsl-libs-cu13" },
|
||||
]
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/b2/ec/14e6ecbfed31ec35bbd1bb6965ae61f879370906a8f9c2e851e292704ba4/nvidia_cutlass_dsl-4.6.2-py3-none-any.whl", hash = "sha256:06ac62deb182a852dfb053032cf945bf02b9aa1bf502a18b129d280d7babb26c", size = 10460, upload-time = "2026-08-05T14:39:41.657Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/af/ef/903dab832a19e0f1d798c9acc96edbda5dfb29f2e030b46e163946555817/nvidia_cutlass_dsl-4.7.1-py3-none-any.whl", hash = "sha256:765850c74868a0b5a02fefbfc1b380842b64e5f7a1c8b1655e322a3b14c01726", size = 10460, upload-time = "2026-08-26T03:11:56.593Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nvidia-cutlass-dsl-libs-base"
|
||||
version = "4.6.2"
|
||||
version = "4.7.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "cuda-python" },
|
||||
@@ -4122,13 +4128,13 @@ dependencies = [
|
||||
{ name = "typing-extensions" },
|
||||
]
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/aa/f3/4be98f2faa283471e355a42ecbc20956fb2c3b6dbc71861f483be277e99a/nvidia_cutlass_dsl_libs_base-4.6.2-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:e129db7155d56ba4478be098c0f819e37690a6ce5d43a9a9a83bf1300d32c57f", size = 3321894, upload-time = "2026-08-05T14:12:30.139Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/54/1b/cf4a0837054bb4b9dc36cdd86f9d2e7fead3629e3373aaa7f7ec1e5e1542/nvidia_cutlass_dsl_libs_base-4.6.2-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:24dfaddad6077fd0de14eecaf66a72762f2f5f30ae1872231f5bf8b243ac2eac", size = 2824987, upload-time = "2026-08-05T14:12:49.618Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/9f/6e/5d3f67caba70fe9a5cc21b845d2be35d88049da536185196a2644b0d461c/nvidia_cutlass_dsl_libs_base-4.7.1-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:e86c55a5010a7edfc067648a75cb29d0c5bd67d75210168cf507b0d0e4d15ba7", size = 3329548, upload-time = "2026-08-26T02:53:14.176Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/55/b5/af332a4dbb0dba45828994d9789d1969dfecca006a6221cd8b92e4825d3f/nvidia_cutlass_dsl_libs_base-4.7.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:c2b67dacabfc905e4d132784fe4848647f40b0b97b1cdde3ce4a482642536b84", size = 2832971, upload-time = "2026-08-26T02:53:52.164Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nvidia-cutlass-dsl-libs-core"
|
||||
version = "4.6.2"
|
||||
version = "4.7.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "cuda-python" },
|
||||
@@ -4138,12 +4144,12 @@ dependencies = [
|
||||
{ name = "typing-extensions" },
|
||||
]
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/7c/ef/10c0089234a32f1379e1f213f28f8c7521a9ff0154e3acc58f613d5ef3be/nvidia_cutlass_dsl_libs_core-4.6.2-py3-none-any.whl", hash = "sha256:571d4b46fca1bfbb123d0dc348eaa7fd80af0014ddffc07b849e8195b2364333", size = 772393, upload-time = "2026-08-05T14:09:50.76Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/6b/14/b669cc890f7fd74008d7bc52f493d0a7ff256de10f3941c6676249419c07/nvidia_cutlass_dsl_libs_core-4.7.1-py3-none-any.whl", hash = "sha256:c65662abc9ab18fd997c57547895736928e559f4624bbe2aa1aa91418ea014ca", size = 1235214, upload-time = "2026-08-26T02:50:56.241Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nvidia-cutlass-dsl-libs-cu13"
|
||||
version = "4.6.2"
|
||||
version = "4.7.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "cuda-python" },
|
||||
@@ -4154,8 +4160,8 @@ dependencies = [
|
||||
{ name = "typing-extensions" },
|
||||
]
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/46/38/bbe5b8f1ef1a15e7bd1e2ea86686c38f15eeee0a4ba440a5d00d8222cb8e/nvidia_cutlass_dsl_libs_cu13-4.6.2-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:b9543257622ce70d696c6a2bda7e9617ef5b1cc9f29bfe66f4b38d1d1e29a8cb", size = 86712108, upload-time = "2026-08-05T14:27:35.488Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ca/05/7874c37d50e112177a64a96dd6c7eaeacb1661ebb864e0fe5cfd9f706767/nvidia_cutlass_dsl_libs_cu13-4.6.2-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:a299a623fad75eb752c1a4e447b924e9049ed396b037509c41a48da82d1f340a", size = 88036030, upload-time = "2026-08-05T14:27:58.991Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/30/ea/c7c2b4da3d6c9818e152e20cd5f797fb6d9ef75c3a5c80d2d6a9cb211489/nvidia_cutlass_dsl_libs_cu13-4.7.1-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:e675bf04dc6c91f7c4d5540699b7a031f2b8b44cd2687b32c20892f112f7e0d9", size = 86957786, upload-time = "2026-08-26T03:07:23.015Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/10/71/e178bb0858fd7b96857e98e3acec70b23f13b88540a2fcc53569f8e8ea34/nvidia_cutlass_dsl_libs_cu13-4.7.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:20c14e16125cb8e36bc9947a9f0a57a660f44651365337b911c84abde4967f5f", size = 88260436, upload-time = "2026-08-26T03:07:59.639Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4237,7 +4243,7 @@ version = "0.1.1"
|
||||
source = { editable = "deps/prime-envs/environments/search/officeqa_pro_v2" }
|
||||
dependencies = [
|
||||
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "verifiers" },
|
||||
]
|
||||
|
||||
@@ -4269,7 +4275,7 @@ version = "0.1.0"
|
||||
source = { editable = "deps/prime-envs/environments/long_context/oolong_pairs" }
|
||||
dependencies = [
|
||||
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "verifiers" },
|
||||
]
|
||||
|
||||
@@ -4371,7 +4377,7 @@ version = "0.1.5"
|
||||
source = { editable = "deps/prime-envs/environments/swe/openswe" }
|
||||
dependencies = [
|
||||
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "verifiers" },
|
||||
]
|
||||
|
||||
@@ -4658,7 +4664,7 @@ version = "0.1.1"
|
||||
source = { editable = "deps/prime-envs/environments/search/pi_officeqa_pro_v2" }
|
||||
dependencies = [
|
||||
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "verifiers" },
|
||||
]
|
||||
|
||||
@@ -4799,6 +4805,45 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/e6/88/bdb244e40284ded3632a9f88c23bc80230bd7b2ae4a8b7f2cc91adead7a8/preshed-3.0.13-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2e77bed56aded7cbe5d28d6bd2178bc5b13eda0e0e464dab205fb578fa915000", size = 1919236, upload-time = "2026-03-23T08:56:42.616Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "prime"
|
||||
version = "0.8.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "build" },
|
||||
{ name = "cryptography" },
|
||||
{ name = "gitignore-parser" },
|
||||
{ name = "httpx" },
|
||||
{ name = "prime-evals" },
|
||||
{ name = "prime-sandboxes" },
|
||||
{ name = "prime-traces" },
|
||||
{ name = "prime-tunnel" },
|
||||
{ name = "pydantic" },
|
||||
{ name = "pyyaml" },
|
||||
{ name = "rich" },
|
||||
{ name = "toml" },
|
||||
{ name = "tomli" },
|
||||
{ name = "typer" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/68/c8/b37b13f4a5904be93d14b34485202577a18b7a70e995dda8082283ac1d17/prime-0.8.0.tar.gz", hash = "sha256:cd86f667b5c8910c36e748ecfdb1680025cf1928d6c51a696c74c8fec05c2596", size = 529963, upload-time = "2026-09-29T01:33:26.6Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/db/85/01110e29549272e4965c64112c490df0dba85968397e1fa6bdbe001aee2f/prime-0.8.0-py3-none-any.whl", hash = "sha256:fcbbbbad72489497eb0f17e62c3966d11182d38e1d6e217b3844fc6c3b2d85c4", size = 287686, upload-time = "2026-09-29T01:33:25.089Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "prime-evals"
|
||||
version = "0.2.4"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "httpx" },
|
||||
{ name = "pydantic" },
|
||||
{ name = "tenacity" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/9c/89/bfbb4aa271669b16e9bc1303d3edeaaace000e5dd29df9ac7ffebf1fb59e/prime_evals-0.2.4.tar.gz", hash = "sha256:759d99e58f587ce8be314a58bdc811106006a74435e981c95c7783045f41cdd0", size = 16575, upload-time = "2026-09-15T17:15:12.452Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/b8/95/c3c2ac163f3ae4909e3e4f47f3244441006432e9e78e9a14833466bac769/prime_evals-0.2.4-py3-none-any.whl", hash = "sha256:50641df3bbc63acac9a85595c2ec363260d41bcc78775a227800449c20648f69", size = 14267, upload-time = "2026-09-15T17:15:11.083Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "prime-kernels"
|
||||
version = "0.1.0+cu130torch2.13.0"
|
||||
@@ -4878,10 +4923,10 @@ dependencies = [
|
||||
{ name = "openai" },
|
||||
{ name = "orjson" },
|
||||
{ name = "pandas" },
|
||||
{ name = "prime" },
|
||||
{ name = "prime-pydantic-config" },
|
||||
{ name = "prime-rl-configs" },
|
||||
{ name = "prime-runs", extra = ["train"] },
|
||||
{ name = "prime-sandboxes" },
|
||||
{ name = "prometheus-client" },
|
||||
{ name = "psutil" },
|
||||
{ name = "pyarrow" },
|
||||
@@ -4928,8 +4973,8 @@ all = [
|
||||
{ name = "torchdata", marker = "sys_platform == 'linux'" },
|
||||
{ name = "torchtitan", marker = "sys_platform == 'linux'" },
|
||||
{ name = "torchvision", marker = "sys_platform == 'linux'" },
|
||||
{ name = "vllm", version = "0.29.0", source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.29.0/vllm-0.29.0-cp38-abi3-manylinux_2_28_aarch64.whl" }, marker = "platform_machine != 'x86_64' and sys_platform == 'linux'" },
|
||||
{ name = "vllm", version = "0.29.0", source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.29.0/vllm-0.29.0-cp38-abi3-manylinux_2_28_x86_64.whl" }, marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },
|
||||
{ name = "vllm", version = "0.30.0", source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.30.0/vllm-0.30.0-cp38-abi3-manylinux_2_28_aarch64.whl" }, marker = "platform_machine != 'x86_64' and sys_platform == 'linux'" },
|
||||
{ name = "vllm", version = "0.30.0", source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.30.0/vllm-0.30.0-cp38-abi3-manylinux_2_28_x86_64.whl" }, marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },
|
||||
{ name = "vllm-router", version = "0.2.1", source = { url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.2.1/vllm_router-0.2.1-cp38-abi3-manylinux_2_28_aarch64.whl" }, marker = "platform_machine != 'x86_64' and sys_platform == 'linux'" },
|
||||
{ name = "vllm-router", version = "0.2.1", source = { url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.2.1/vllm_router-0.2.1-cp38-abi3-manylinux_2_28_x86_64.whl" }, marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },
|
||||
]
|
||||
@@ -4978,8 +5023,8 @@ gpu = [
|
||||
{ name = "torchdata", marker = "sys_platform == 'linux'" },
|
||||
{ name = "torchtitan", marker = "sys_platform == 'linux'" },
|
||||
{ name = "torchvision", marker = "sys_platform == 'linux'" },
|
||||
{ name = "vllm", version = "0.29.0", source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.29.0/vllm-0.29.0-cp38-abi3-manylinux_2_28_aarch64.whl" }, marker = "platform_machine != 'x86_64' and sys_platform == 'linux'" },
|
||||
{ name = "vllm", version = "0.29.0", source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.29.0/vllm-0.29.0-cp38-abi3-manylinux_2_28_x86_64.whl" }, marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },
|
||||
{ name = "vllm", version = "0.30.0", source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.30.0/vllm-0.30.0-cp38-abi3-manylinux_2_28_aarch64.whl" }, marker = "platform_machine != 'x86_64' and sys_platform == 'linux'" },
|
||||
{ name = "vllm", version = "0.30.0", source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.30.0/vllm-0.30.0-cp38-abi3-manylinux_2_28_x86_64.whl" }, marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },
|
||||
]
|
||||
kernels = [
|
||||
{ name = "prime-kernels", version = "0.1.0+cu130torch2.13.0", source = { url = "https://github.com/PrimeIntellect-ai/prime-kernels/releases/download/v0.1.1/prime_kernels-0.1.0+cu130torch2.13.0-cp312-cp312-linux_aarch64.whl" }, marker = "platform_machine != 'x86_64' and sys_platform == 'linux'" },
|
||||
@@ -5037,6 +5082,7 @@ requires-dist = [
|
||||
{ name = "orjson", specifier = ">=3.10" },
|
||||
{ name = "orjson", specifier = ">=3.11.0" },
|
||||
{ name = "pandas", specifier = ">=2.0" },
|
||||
{ name = "prime", specifier = ">=0.8.0" },
|
||||
{ name = "prime-kernels", marker = "platform_machine == 'aarch64' and sys_platform == 'linux' and extra == 'kernels'", url = "https://github.com/PrimeIntellect-ai/prime-kernels/releases/download/v0.1.1/prime_kernels-0.1.0+cu130torch2.13.0-cp312-cp312-linux_aarch64.whl" },
|
||||
{ name = "prime-kernels", marker = "platform_machine != 'aarch64' and platform_machine != 'x86_64' and sys_platform == 'linux' and extra == 'kernels'" },
|
||||
{ name = "prime-kernels", marker = "platform_machine == 'x86_64' and sys_platform == 'linux' and extra == 'kernels'", url = "https://github.com/PrimeIntellect-ai/prime-kernels/releases/download/v0.1.1/prime_kernels-0.1.0+cu130torch2.13.0-cp312-cp312-linux_x86_64.whl" },
|
||||
@@ -5049,7 +5095,6 @@ requires-dist = [
|
||||
{ name = "prime-rl", extras = ["quack"], marker = "extra == 'all'" },
|
||||
{ name = "prime-rl-configs", editable = "packages/prime-rl-configs" },
|
||||
{ name = "prime-runs", extras = ["train"], specifier = ">=0.1.3" },
|
||||
{ name = "prime-sandboxes", specifier = ">=0.3.2" },
|
||||
{ name = "prometheus-client", specifier = ">=0.20.0" },
|
||||
{ name = "psutil", specifier = ">=7.0.0" },
|
||||
{ name = "pyarrow", specifier = ">=21.0.0" },
|
||||
@@ -5075,9 +5120,9 @@ requires-dist = [
|
||||
{ name = "uvicorn", marker = "extra == 'dashboard'", specifier = ">=0.30" },
|
||||
{ name = "uvloop", specifier = ">=0.21.0" },
|
||||
{ name = "verifiers", extras = ["harbor"], editable = "deps/verifiers" },
|
||||
{ name = "vllm", marker = "platform_machine == 'aarch64' and sys_platform == 'linux' and extra == 'gpu'", url = "https://github.com/vllm-project/vllm/releases/download/v0.29.0/vllm-0.29.0-cp38-abi3-manylinux_2_28_aarch64.whl" },
|
||||
{ name = "vllm", marker = "platform_machine != 'aarch64' and platform_machine != 'x86_64' and sys_platform == 'linux' and extra == 'gpu'", specifier = ">=0.29.0" },
|
||||
{ name = "vllm", marker = "platform_machine == 'x86_64' and sys_platform == 'linux' and extra == 'gpu'", url = "https://github.com/vllm-project/vllm/releases/download/v0.29.0/vllm-0.29.0-cp38-abi3-manylinux_2_28_x86_64.whl" },
|
||||
{ name = "vllm", marker = "platform_machine == 'aarch64' and sys_platform == 'linux' and extra == 'gpu'", url = "https://github.com/vllm-project/vllm/releases/download/v0.30.0/vllm-0.30.0-cp38-abi3-manylinux_2_28_aarch64.whl" },
|
||||
{ name = "vllm", marker = "platform_machine != 'aarch64' and platform_machine != 'x86_64' and sys_platform == 'linux' and extra == 'gpu'", specifier = ">=0.30.0" },
|
||||
{ name = "vllm", marker = "platform_machine == 'x86_64' and sys_platform == 'linux' and extra == 'gpu'", url = "https://github.com/vllm-project/vllm/releases/download/v0.30.0/vllm-0.30.0-cp38-abi3-manylinux_2_28_x86_64.whl" },
|
||||
{ name = "vllm-router", marker = "platform_machine == 'aarch64' and sys_platform == 'linux' and extra == 'disagg'", url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.2.1/vllm_router-0.2.1-cp38-abi3-manylinux_2_28_aarch64.whl" },
|
||||
{ name = "vllm-router", marker = "platform_machine != 'aarch64' and platform_machine != 'x86_64' and sys_platform == 'linux' and extra == 'disagg'" },
|
||||
{ name = "vllm-router", marker = "platform_machine == 'x86_64' and sys_platform == 'linux' and extra == 'disagg'", url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.2.1/vllm_router-0.2.1-cp38-abi3-manylinux_2_28_x86_64.whl" },
|
||||
@@ -5160,15 +5205,15 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "prime-traces"
|
||||
version = "0.0.4"
|
||||
version = "0.0.7"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "httpx" },
|
||||
{ name = "pydantic" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/5f/5d/d3646fb34d4f3cf4caf2064eb3830c4da5c18a3ecd3292ce9e85eb04398f/prime_traces-0.0.4.tar.gz", hash = "sha256:713b59984292304bd4e99a55998b7d69373f22b5205a7e097ef0d0d8e531561c", size = 50935, upload-time = "2026-09-04T16:51:10.488Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/26/f6/d015f0d09ec0e83a7b57662062ac5df5ee00cb53cc25e98c2c5780430c4f/prime_traces-0.0.7.tar.gz", hash = "sha256:638b22ced135d46ae386246b7d666f75e831e3db942a0e379b1ad2c9fabfa8e7", size = 56910, upload-time = "2026-09-25T18:20:29.881Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/b6/55/de30cc732631522f5f12cb590b63b80cb1c6ca004ad81762d94ee7dda256/prime_traces-0.0.4-py3-none-any.whl", hash = "sha256:68f2b527d266f9c3d02f6c86a1713309a58a61b81e1be6be43948e1dd2456d8f", size = 38409, upload-time = "2026-09-04T16:51:09.201Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/74/e9/710e44430f38f8901ad4141c6e8f353c666435166f713bec52431d3e3581/prime_traces-0.0.7-py3-none-any.whl", hash = "sha256:646e5e178428de7dec49d2eb074f42345536139d8b7016dd87c538d431241411", size = 41921, upload-time = "2026-09-25T18:20:28.53Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5191,7 +5236,7 @@ version = "1.2.3"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "jinja2" },
|
||||
{ name = "junitparser" },
|
||||
{ name = "pydantic" },
|
||||
@@ -5211,7 +5256,7 @@ version = "0.2.0"
|
||||
source = { editable = "deps/prime-envs/environments/code/programbench_env" }
|
||||
dependencies = [
|
||||
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "programbench" },
|
||||
{ name = "verifiers" },
|
||||
]
|
||||
@@ -5845,7 +5890,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "quack-kernels"
|
||||
version = "0.6.4"
|
||||
version = "0.6.5"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "apache-tvm-ffi" },
|
||||
@@ -5854,9 +5899,9 @@ dependencies = [
|
||||
{ name = "torch", version = "2.13.0+cu130", source = { registry = "https://download.pytorch.org/whl/cu130" } },
|
||||
{ name = "torch-c-dlpack-ext" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/75/5c/67c4a0d54cbb8d4d05af73132d620d1900a193b33e0d5ea6a25829b941d2/quack_kernels-0.6.4.tar.gz", hash = "sha256:8bf08a0e1a85aecc892ce84f4b6ed7abb6a44ec7c68b83040abe174bc8c2b936", size = 845485, upload-time = "2026-08-07T23:25:31.94Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/5f/18/6c2a20d00dff254f154fb3b951f4e5a0377a60122c17385e5f08d5f5b5e1/quack_kernels-0.6.5.tar.gz", hash = "sha256:dd9405a4a6fa35fc3a5a18fe35b46a14b0bf7e3ad9fe2451903e355047ac471d", size = 846876, upload-time = "2026-09-11T05:08:20.621Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/28/f5/36ec7e075e90bd92bdf30fee0606f189348c2bbb0af6aebaf7382927c622/quack_kernels-0.6.4-py3-none-any.whl", hash = "sha256:e77c5d1f1299b0b38487fe8737df6c6975daa16bca7f7eb883bd1a74d09e7e78", size = 728458, upload-time = "2026-08-07T23:25:30.549Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/73/d8/f5e56c38b286308d115a171e3c5c44f24e9d03980c3cfd22588df40261fa/quack_kernels-0.6.5-py3-none-any.whl", hash = "sha256:df1ddd31366c82eb9692fe087c671209189dcbde53c909c81a865d4ee66b158d", size = 729615, upload-time = "2026-09-11T05:08:19.306Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -6135,7 +6180,7 @@ version = "0.1.0"
|
||||
source = { editable = "deps/prime-envs/environments/search/s1_deepresearch" }
|
||||
dependencies = [
|
||||
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "verifiers" },
|
||||
]
|
||||
|
||||
@@ -6257,7 +6302,7 @@ version = "5.6.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "numpy" },
|
||||
{ name = "scikit-learn" },
|
||||
{ name = "scipy" },
|
||||
@@ -6860,7 +6905,7 @@ version = "0.1.2"
|
||||
source = { editable = "deps/prime-envs/environments/terminal/terminal_lego" }
|
||||
dependencies = [
|
||||
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "verifiers", extra = ["harbor"] },
|
||||
]
|
||||
|
||||
@@ -6983,7 +7028,7 @@ version = "0.22.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/73/6f/f80cfef4a312e1fb34baf7d85c72d4411afde10978d4657f8cdd811d3ccc/tokenizers-0.22.2.tar.gz", hash = "sha256:473b83b915e547aa366d1eee11806deaf419e17be16310ac0a14077f1e28f917", size = 372115, upload-time = "2026-01-05T10:45:15.988Z" }
|
||||
wheels = [
|
||||
@@ -7283,7 +7328,7 @@ version = "0.1.0"
|
||||
source = { editable = "deps/prime-envs/environments/judges/trace_cheating_recall_500" }
|
||||
dependencies = [
|
||||
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "orjson" },
|
||||
{ name = "verifiers" },
|
||||
]
|
||||
@@ -7310,7 +7355,7 @@ version = "5.6.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "numpy" },
|
||||
{ name = "packaging" },
|
||||
{ name = "pyyaml" },
|
||||
@@ -7699,7 +7744,7 @@ version = "0.1.1"
|
||||
source = { editable = "deps/prime-envs/environments/multimodal/virl39k" }
|
||||
dependencies = [
|
||||
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
|
||||
{ name = "verifiers" },
|
||||
]
|
||||
|
||||
@@ -7726,8 +7771,8 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "vllm"
|
||||
version = "0.29.0"
|
||||
source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.29.0/vllm-0.29.0-cp38-abi3-manylinux_2_28_aarch64.whl" }
|
||||
version = "0.30.0"
|
||||
source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.30.0/vllm-0.30.0-cp38-abi3-manylinux_2_28_aarch64.whl" }
|
||||
resolution-markers = [
|
||||
"platform_machine == 'aarch64' and sys_platform == 'linux'",
|
||||
]
|
||||
@@ -7746,7 +7791,7 @@ dependencies = [
|
||||
{ name = "fastsafetensors" },
|
||||
{ name = "filelock" },
|
||||
{ name = "flashinfer-python" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" } },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" } },
|
||||
{ name = "humming-kernels", extra = ["cu13"] },
|
||||
{ name = "ijson" },
|
||||
{ name = "instanttensor" },
|
||||
@@ -7809,7 +7854,7 @@ dependencies = [
|
||||
{ name = "xgrammar" },
|
||||
]
|
||||
wheels = [
|
||||
{ url = "https://github.com/vllm-project/vllm/releases/download/v0.29.0/vllm-0.29.0-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:e6b0dfc2b6fd307315e9b34b73cd2bfe7b6b08958eda721828e61732bba426b0" },
|
||||
{ url = "https://github.com/vllm-project/vllm/releases/download/v0.30.0/vllm-0.30.0-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:eb3e11bab695d085098579a6eda2d602419adec3826ebfbcce9a3ffa543eb62e" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
@@ -7818,7 +7863,7 @@ requires-dist = [
|
||||
{ name = "anthropic", specifier = ">=0.71.0" },
|
||||
{ name = "apache-tvm-ffi", specifier = "==0.1.11" },
|
||||
{ name = "av", marker = "extra == 'audio'" },
|
||||
{ name = "b12x", marker = "extra == 'b12x'", specifier = "==1.2.6" },
|
||||
{ name = "b12x", marker = "extra == 'b12x'", specifier = "==1.3.0" },
|
||||
{ name = "blake3" },
|
||||
{ name = "cachetools" },
|
||||
{ name = "cbor2" },
|
||||
@@ -7831,9 +7876,9 @@ requires-dist = [
|
||||
{ name = "fastsafetensors", specifier = ">=0.3.3" },
|
||||
{ name = "fastsafetensors", marker = "extra == 'fastsafetensors'", specifier = ">=0.3.3" },
|
||||
{ name = "filelock", specifier = ">=3.16.1" },
|
||||
{ name = "flashinfer-python", specifier = "==0.6.18" },
|
||||
{ name = "flashinfer-python", specifier = "==0.6.18.post1" },
|
||||
{ name = "helion", marker = "extra == 'helion'", specifier = "==1.4.0" },
|
||||
{ name = "huggingface-hub", specifier = ">=1.28.0" },
|
||||
{ name = "huggingface-hub", specifier = ">=1.31.0" },
|
||||
{ name = "humming-kernels", extras = ["cu13"], specifier = "==0.1.12" },
|
||||
{ name = "ijson" },
|
||||
{ name = "instanttensor", specifier = ">=0.1.9" },
|
||||
@@ -7843,7 +7888,7 @@ requires-dist = [
|
||||
{ name = "llguidance", marker = "platform_machine == 'aarch64' or platform_machine == 'arm64' or platform_machine == 'ppc64le' or platform_machine == 's390x' or platform_machine == 'x86_64'", specifier = ">=1.7.0,<1.8.0" },
|
||||
{ name = "lm-format-enforcer", specifier = "==0.11.3" },
|
||||
{ name = "matplotlib", marker = "extra == 'bench'" },
|
||||
{ name = "mcp" },
|
||||
{ name = "mcp", specifier = ">=2.0.0,<3.0.0" },
|
||||
{ name = "mistral-common", extras = ["audio"], marker = "extra == 'audio'" },
|
||||
{ name = "mistral-common", extras = ["image"], specifier = ">=1.11.6" },
|
||||
{ name = "model-hosting-container-standards", specifier = ">=0.1.14,<1.0.0" },
|
||||
@@ -7852,10 +7897,10 @@ requires-dist = [
|
||||
{ name = "numba", specifier = "==0.65.0" },
|
||||
{ name = "numpy" },
|
||||
{ name = "nvidia-cudnn-frontend", specifier = ">=1.19.1" },
|
||||
{ name = "nvidia-cutlass-dsl", extras = ["cu13"], specifier = "==4.6.2" },
|
||||
{ name = "nvidia-cutlass-dsl", extras = ["cu13"], specifier = "==4.7.1" },
|
||||
{ name = "nvidia-deepstream-videodecode-cu13", marker = "extra == 'deepstream'", specifier = ">=9.0.2" },
|
||||
{ name = "nvtx", specifier = "==0.2.15" },
|
||||
{ name = "openai", specifier = ">=2.0.0" },
|
||||
{ name = "openai", specifier = ">=2.25.0" },
|
||||
{ name = "openai-harmony", specifier = ">=0.0.3" },
|
||||
{ name = "opencv-python-headless", specifier = ">=4.13.0" },
|
||||
{ name = "opentelemetry-api", specifier = ">=1.27.0" },
|
||||
@@ -7882,7 +7927,7 @@ requires-dist = [
|
||||
{ name = "python-json-logger" },
|
||||
{ name = "pyyaml" },
|
||||
{ name = "pyzmq", specifier = ">=25.0.0" },
|
||||
{ name = "quack-kernels", specifier = "==0.6.4" },
|
||||
{ name = "quack-kernels", specifier = "==0.6.5" },
|
||||
{ name = "regex" },
|
||||
{ name = "requests", specifier = ">=2.26.0" },
|
||||
{ name = "runai-model-streamer", extras = ["azure", "gcs", "s3"], marker = "extra == 'runai'", specifier = ">=0.15.7" },
|
||||
@@ -7919,8 +7964,8 @@ provides-extras = ["zen", "bench", "tensorizer", "fastsafetensors", "instanttens
|
||||
|
||||
[[package]]
|
||||
name = "vllm"
|
||||
version = "0.29.0"
|
||||
source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.29.0/vllm-0.29.0-cp38-abi3-manylinux_2_28_x86_64.whl" }
|
||||
version = "0.30.0"
|
||||
source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.30.0/vllm-0.30.0-cp38-abi3-manylinux_2_28_x86_64.whl" }
|
||||
resolution-markers = [
|
||||
"platform_machine == 'x86_64' and sys_platform == 'linux'",
|
||||
]
|
||||
@@ -7939,7 +7984,7 @@ dependencies = [
|
||||
{ name = "fastsafetensors" },
|
||||
{ name = "filelock" },
|
||||
{ name = "flashinfer-python" },
|
||||
{ name = "huggingface-hub", version = "1.28.0", source = { registry = "https://pypi.org/simple" } },
|
||||
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" } },
|
||||
{ name = "humming-kernels", extra = ["cu13"] },
|
||||
{ name = "ijson" },
|
||||
{ name = "instanttensor" },
|
||||
@@ -8002,7 +8047,7 @@ dependencies = [
|
||||
{ name = "xgrammar" },
|
||||
]
|
||||
wheels = [
|
||||
{ url = "https://github.com/vllm-project/vllm/releases/download/v0.29.0/vllm-0.29.0-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:09d48617fc2be9c6cdcd5db480651ab0d84817b257204f2cc2e3ecbb70bbb635" },
|
||||
{ url = "https://github.com/vllm-project/vllm/releases/download/v0.30.0/vllm-0.30.0-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:ef52ee58c410ead0b8afb190838fa4cbcb52075596f67862a03859d984966ac4" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
@@ -8011,7 +8056,7 @@ requires-dist = [
|
||||
{ name = "anthropic", specifier = ">=0.71.0" },
|
||||
{ name = "apache-tvm-ffi", specifier = "==0.1.11" },
|
||||
{ name = "av", marker = "extra == 'audio'" },
|
||||
{ name = "b12x", marker = "extra == 'b12x'", specifier = "==1.2.6" },
|
||||
{ name = "b12x", marker = "extra == 'b12x'", specifier = "==1.3.0" },
|
||||
{ name = "blake3" },
|
||||
{ name = "cachetools" },
|
||||
{ name = "cbor2" },
|
||||
@@ -8024,9 +8069,9 @@ requires-dist = [
|
||||
{ name = "fastsafetensors", specifier = ">=0.3.3" },
|
||||
{ name = "fastsafetensors", marker = "extra == 'fastsafetensors'", specifier = ">=0.3.3" },
|
||||
{ name = "filelock", specifier = ">=3.16.1" },
|
||||
{ name = "flashinfer-python", specifier = "==0.6.18" },
|
||||
{ name = "flashinfer-python", specifier = "==0.6.18.post1" },
|
||||
{ name = "helion", marker = "extra == 'helion'", specifier = "==1.4.0" },
|
||||
{ name = "huggingface-hub", specifier = ">=1.28.0" },
|
||||
{ name = "huggingface-hub", specifier = ">=1.31.0" },
|
||||
{ name = "humming-kernels", extras = ["cu13"], specifier = "==0.1.12" },
|
||||
{ name = "ijson" },
|
||||
{ name = "instanttensor", specifier = ">=0.1.9" },
|
||||
@@ -8036,7 +8081,7 @@ requires-dist = [
|
||||
{ name = "llguidance", marker = "platform_machine == 'aarch64' or platform_machine == 'arm64' or platform_machine == 'ppc64le' or platform_machine == 's390x' or platform_machine == 'x86_64'", specifier = ">=1.7.0,<1.8.0" },
|
||||
{ name = "lm-format-enforcer", specifier = "==0.11.3" },
|
||||
{ name = "matplotlib", marker = "extra == 'bench'" },
|
||||
{ name = "mcp" },
|
||||
{ name = "mcp", specifier = ">=2.0.0,<3.0.0" },
|
||||
{ name = "mistral-common", extras = ["audio"], marker = "extra == 'audio'" },
|
||||
{ name = "mistral-common", extras = ["image"], specifier = ">=1.11.6" },
|
||||
{ name = "model-hosting-container-standards", specifier = ">=0.1.14,<1.0.0" },
|
||||
@@ -8045,10 +8090,10 @@ requires-dist = [
|
||||
{ name = "numba", specifier = "==0.65.0" },
|
||||
{ name = "numpy" },
|
||||
{ name = "nvidia-cudnn-frontend", specifier = ">=1.19.1" },
|
||||
{ name = "nvidia-cutlass-dsl", extras = ["cu13"], specifier = "==4.6.2" },
|
||||
{ name = "nvidia-cutlass-dsl", extras = ["cu13"], specifier = "==4.7.1" },
|
||||
{ name = "nvidia-deepstream-videodecode-cu13", marker = "extra == 'deepstream'", specifier = ">=9.0.2" },
|
||||
{ name = "nvtx", specifier = "==0.2.15" },
|
||||
{ name = "openai", specifier = ">=2.0.0" },
|
||||
{ name = "openai", specifier = ">=2.25.0" },
|
||||
{ name = "openai-harmony", specifier = ">=0.0.3" },
|
||||
{ name = "opencv-python-headless", specifier = ">=4.13.0" },
|
||||
{ name = "opentelemetry-api", specifier = ">=1.27.0" },
|
||||
@@ -8075,7 +8120,7 @@ requires-dist = [
|
||||
{ name = "python-json-logger" },
|
||||
{ name = "pyyaml" },
|
||||
{ name = "pyzmq", specifier = ">=25.0.0" },
|
||||
{ name = "quack-kernels", specifier = "==0.6.4" },
|
||||
{ name = "quack-kernels", specifier = "==0.6.5" },
|
||||
{ name = "regex" },
|
||||
{ name = "requests", specifier = ">=2.26.0" },
|
||||
{ name = "runai-model-streamer", extras = ["azure", "gcs", "s3"], marker = "extra == 'runai'", specifier = ">=0.15.7" },
|
||||
|
||||
Reference in New Issue
Block a user