Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
d33420b
basic launcher
rafapi Dec 12, 2025
acad1e7
single channel streams
rafapi Dec 12, 2025
9a7eab0
update
rafapi Dec 12, 2025
b526d8d
Merge branch 'main' into fast-llm
rafapi Dec 16, 2025
9543265
enable fast-llm for basic streaming
rafapi Dec 19, 2025
1d9ac8d
enable fast-llm for basic streaming
rafapi Dec 19, 2025
6d42ade
set cwd
rafapi Dec 19, 2025
e8674e1
convert samples for fast-llm format
rafapi Dec 19, 2025
e78844e
listen to trainer events from redis
rafapi Dec 19, 2025
d16a829
put all the samples in a single stream
rafapi Dec 19, 2025
67b3f2b
fix accessing non complete dists
bigximik Feb 9, 2026
dc04911
change to calling fast-llm without conda
bigximik Feb 9, 2026
30a5346
fix imports for vllm .14.1rc1
bigximik Feb 9, 2026
9df2feb
tmp changes to not install dependencies which are in base image already
bigximik Feb 9, 2026
49707aa
2 gpu and 1 gpu integration tests
bigximik Feb 13, 2026
a893686
changes for tests
bigximik Feb 13, 2026
641e457
added instruction to install PipelineRL+FastLLM
bigximik Feb 13, 2026
7d14e80
added fast-llm bradcast functionality and test
bigximik Feb 18, 2026
dad6242
refactoring of traning helper
bigximik Feb 20, 2026
402f29a
added stop traning support and changed engine clean up logic to warn …
bigximik Feb 20, 2026
3848fbc
added 3 and 4 gpu tests (not run yet), added traning end event, added…
bigximik Feb 20, 2026
e170185
fix setting current device for tp and pp cases
bigximik Feb 23, 2026
3541dfe
fix multi actor generation abab patter consistency check
bigximik Feb 23, 2026
5560ada
fast-llm weight update bug fix some other changes
bigximik Mar 2, 2026
f4cc7a4
note update
bigximik Mar 2, 2026
f78be64
fix no weight bradcast case with fast-llm
bigximik Mar 2, 2026
807f47c
added data for grpo loss to send to fast-llm, added base fast-llm con…
bigximik Mar 2, 2026
407be1d
fast-llm weights broadcast integration
bigximik Mar 3, 2026
b7e2109
removed duplicate option
bigximik Mar 4, 2026
a3f6ed2
Merge pull request #128 from ServiceNow/fast-llm
rafapi Mar 4, 2026
ceed0bf
added pass through of wandb params to fast-llm, bigger seq len in dem…
bigximik Mar 5, 2026
6ecfa40
fix loss masking
bigximik Mar 6, 2026
152d489
integrated fast-llm config and changed to start fast-llm with pytorch
bigximik Mar 6, 2026
c1aeaac
migrate fast-llm weight broadcast to ProcessGroupPool API
bigximik Mar 19, 2026
29964cc
fix fast-llm config schema and subprocess launcher
bigximik Mar 19, 2026
f48386b
fix missed broadcast API in timed_broadcast_fast_llm inner function
bigximik Mar 20, 2026
b3a0f64
fix fast-llm lag check interval: reduce from 5s to 0s
bigximik Mar 24, 2026
58a8798
update base and counting configs for fast-llm: max_ready_samples, vll…
bigximik Mar 24, 2026
979bdf1
split fast-llm lag polling into dedicated thread separate from event …
bigximik Mar 24, 2026
38783a5
fix seq_length validation to use micro_batch_size for fast-llm path
bigximik Mar 24, 2026
b8b9885
set use_fast_llm=true as default, add max_model_len and vllm v1 to co…
bigximik Mar 24, 2026
1f3ca5e
increase grpo epsilon from 0.1 to 0.2 in counting config
bigximik Mar 24, 2026
bd18f46
add data pipeline diagnostic logging (log_data_pipeline flag)
bigximik Mar 25, 2026
31820d2
add Redis verbose logging to file for crash diagnosis
bigximik Mar 25, 2026
c51d6bd
handle vLLM 4xx errors gracefully instead of crashing the actor
bigximik Apr 16, 2026
00ddfc3
fix vLLM port race condition when starting multiple actor servers
bigximik Apr 16, 2026
e10e8ce
add 8-GPU math 7B submit script and actor error handling tests
bigximik Apr 16, 2026
326199a
merge: origin/vllm_v1 into fast-llm (main catch-up + PR #137 fixes)
bigximik Apr 23, 2026
562214a
vllm1: default weight_update_mode to 'http' when args lacks the attr
bigximik Apr 23, 2026
0cde577
launch: dispatch run_finetune to DeepSpeed when use_fast_llm=false
bigximik Apr 23, 2026
e0f01a4
vllm1 HTTP path: use StatelessProcessGroup to match the trainer
bigximik Apr 23, 2026
8893d2c
preprocess: guard unpacked-mode popleft against partial queue
bigximik Apr 23, 2026
842736c
launch: use absolute paths for redis --dir and --logfile
bigximik Apr 23, 2026
b753ece
vllm1: drop pause/resume wrap on fast-llm path
bigximik Apr 23, 2026
54d4eeb
vllm1: re-add pause/resume wrap on fast-llm path with startup gate
bigximik Apr 23, 2026
612b9bf
vllm1: use _pause_generation helper that drains in-flight requests
bigximik Apr 23, 2026
6829195
multinode: fix DeepSpeed path, log capture, Redis host, and add tests
bigximik Apr 27, 2026
56f4a8f
launch: write per-node output files in multinode finetune to avoid NF…
bigximik Apr 27, 2026
4dce398
vllm v1: enable processed_logprobs mode by default
bigximik Apr 27, 2026
eaa2a9a
vllm1: use mode=keep in pause_generation to match PR #137
bigximik Apr 27, 2026
eeac65e
actor: retry rollout on vLLM abort instead of crashing
bigximik Apr 27, 2026
7f1b87a
world: read GPUS_PER_NODE from env instead of hardcoding 8; add resum…
bigximik Apr 27, 2026
8b19f1f
launch: clear stale pod IPs on resume; unique resume job names in sub…
bigximik Apr 27, 2026
223687f
launch: fix pod IP exchange on resume with session-token barrier
bigximik Apr 27, 2026
b6ea563
launch: use job-specific MASTER_ADDR as pod IP session token
bigximik Apr 27, 2026
9fcfb20
launch: simplify pod IP exchange to per-job subdirectory
bigximik Apr 27, 2026
cc419e5
launch: make pod IP exchange run_id configurable via world.run_id
bigximik Apr 27, 2026
1d25b99
launch: require world.run_id; raise on missing or already-used dir
bigximik Apr 27, 2026
c3cf807
docs: document world.run_id requirement and resume workflow in multin…
bigximik Apr 27, 2026
7594bc1
docs: rewrite multinode run/resume section to be launcher-agnostic
bigximik Apr 27, 2026
13a42bf
Merge origin/vllm_v1 into fast-llm
bigximik Apr 27, 2026
84b95be
actor: use run_in_executor for result_queue.put to avoid blocking eve…
bigximik Apr 27, 2026
92a32db
actor: retry on ServerDisconnectedError; drop dead use_v1 from math.yaml
bigximik Apr 28, 2026
3a5671c
utils: guard against None metadata in wandb python_env collection
bigximik Apr 28, 2026
89ceb1b
fix multi-node job submission scripts for fast-llm branch
bigximik Apr 28, 2026
5d75c7e
Merge remote-tracking branch 'origin/main' into fast-llm
bigximik May 6, 2026
40afa2d
launch scripts: drop top-level fp32_lm_head knob (removed in main)
bigximik May 6, 2026
45ff301
docs(fast-llm): handover docs and interactive smoke examples
bigximik May 6, 2026
abf2b02
docs(fast-llm): trim speculative TODO items from handover doc
bigximik May 6, 2026
613116f
docs(fast-llm): add 400-step comparison charts and outstanding TODOs
bigximik May 6, 2026
b1b8823
docs(fast-llm): simplify metric-gap open question
bigximik May 6, 2026
8c02c87
docs(fast-llm): add image/vLLM version-bump open question
bigximik May 6, 2026
399acf7
docs(fast-llm): document base-image source repo
bigximik May 6, 2026
8ca2b5f
docs(fast-llm): clarify use-vs-build of the toolkit image
bigximik May 6, 2026
6090900
examples(interactive): align ds_4node with the GSPO chart baseline
bigximik May 7, 2026
50c7ff7
docs(fast-llm): track DS GSPO source script and link reproduction rec…
bigximik May 7, 2026
e4bd9b8
docs(fast-llm): parameterize Denis-specific values; drop DS PPO script
bigximik May 7, 2026
902cb7a
docs(fast-llm): add explicit "How to launch" walkthrough
bigximik May 7, 2026
850bcad
docs(fast-llm): drop misleading examples/interactive scripts
bigximik May 7, 2026
0c2f99e
docs(fast-llm): split §9 Testing into 3 subsections
bigximik May 7, 2026
7c2f75e
fix(actor): use training_done event under Fast-LLM, not sample-counti…
RaymondLi0 May 12, 2026
9ab0e53
review: trim verbose comment on is_trainer_finished
RaymondLi0 May 14, 2026
27724b4
fix(preprocess): use training_done under Fast-LLM
jlamypoirier May 29, 2026
33af04e
fix(launch): stop helpers after training completion
jlamypoirier May 29, 2026
12b6eae
Merge pull request #142 from ServiceNow/fix/actor-finished-uses-train…
jlamypoirier Jun 5, 2026
add17c7
Merge pull request #144 from jlamypoirier/fix/actor-finished-uses-tra…
jlamypoirier Jun 5, 2026
d61ee14
Support WANDB_API_KEY_PATH for PipelineRL logging
jlamypoirier Jun 5, 2026
c600170
Merge pull request #145 from ServiceNow/jlp_wandb-api-key-path
jlamypoirier Jun 5, 2026
0ce9b7b
Add safe on-demand faulthandler diagnostics to entrypoints (#149)
jlamypoirier Jul 6, 2026
5b4b936
Use Fast-LLM document count as the model version
jlamypoirier Jul 7, 2026
34a261d
Forward the raw reward to the Fast-LLM trainer
jlamypoirier Jul 7, 2026
fc7b4e8
Capture per-token model version through to the Fast-LLM trainer (B2)
jlamypoirier Jul 7, 2026
ec4fab3
Make the model-version hooks fail-safe in the generation hot path
jlamypoirier Jul 7, 2026
38c5825
Address review: wire completed_step into actor stats; harden version …
jlamypoirier Jul 7, 2026
b2d51db
Add model_version unit tests; fix version-attribution comment
jlamypoirier Jul 7, 2026
c77bdda
Merge pull request #150 from ServiceNow/jlp_rl_metrics
jlamypoirier Jul 8, 2026
8427c18
Merge origin/main into fast-llm
jlamypoirier Jul 10, 2026
7eb4c01
Drop old-vLLM abort-on-pause fallback in _pause_generation
jlamypoirier Jul 10, 2026
18840a0
Skip bf16_last_layer_fp32 quant when vLLM dtype is not bf16
jlamypoirier Jul 10, 2026
0fb5290
Add committed hydra config for Qwen2.5-0.5B GSPO experiment
jlamypoirier Jul 13, 2026
69fc60c
Config comment: describe variants abstractly (no dangling filenames)
jlamypoirier Jul 13, 2026
c9bbb06
Annotate finetune vs fast_llm config sections (backend split + must-m…
jlamypoirier Jul 13, 2026
a96b04c
Split qwen05 GSPO config per backend (shared base + fllm + ds)
jlamypoirier Jul 13, 2026
5d2128f
Trim FL hyperparameter defaults out of base.yaml into the experiment …
jlamypoirier Jul 13, 2026
441dba0
Drop committed launch/monitor scripts carrying environment-specific data
jlamypoirier Jul 13, 2026
9430600
Add committed hydra config for Qwen2.5-7B GSPO experiment (per backend)
jlamypoirier Jul 13, 2026
31df7ca
Make Adam betas config-drivable (finetune.adam_beta1/2)
jlamypoirier Jul 13, 2026
1bd9c9b
Tolerate datasets>=4 removing trust_remote_code from load_dataset
jlamypoirier Jul 13, 2026
75d5892
Apply the datasets>=4 trust_remote_code shim to chartqa too
jlamypoirier Jul 13, 2026
39ed080
Read documents_seen (not document_count) from Fast-LLM weights_ready
jlamypoirier Jul 14, 2026
6889d93
Honor wandb.wandb_name as the W&B run display name
jlamypoirier Jul 14, 2026
96910dc
Remove category-4 throwaway: dead code, debug scaffolding, stale docs
jlamypoirier Jul 14, 2026
16f22f9
Merge jlp_pipelinerl_unrelated_fixes into fast-llm (stack #140 on #151)
jlamypoirier Jul 14, 2026
211d72e
Remove log_data_pipeline data-pipeline diagnostics (cat-4 throwaway)
jlamypoirier Jul 14, 2026
fdb36d0
Merge branch 'jlp_pipelinerl_unrelated_fixes' into fast-llm
jlamypoirier Jul 14, 2026
5ffcb4c
Keep debug.log_data_pipeline config key
jlamypoirier Jul 15, 2026
8352b45
Fix group-size check for dropped rollouts; drop dead abort block
jlamypoirier Jul 15, 2026
3f2bbb5
Merge branch 'jlp_pipelinerl_unrelated_fixes' into fast-llm
jlamypoirier Jul 15, 2026
7923420
Merge jlp_pipelinerl_unrelated_fixes into fast-llm
jlamypoirier Jul 15, 2026
f83c3b1
Merge branch 'jlp_fast_llm_core' into fast-llm
jlamypoirier Jul 15, 2026
c47f096
Merge branch 'jlp_fast_llm_core' into fast-llm
jlamypoirier Jul 15, 2026
c993ca5
Merge branch 'jlp_fast_llm_core' into fast-llm
jlamypoirier Jul 16, 2026
22a88b9
Re-add per-token model-version tagging (consumers live in this PR)
jlamypoirier Jul 16, 2026
0c810be
Merge branch 'jlp_fast_llm_core' into fast-llm
jlamypoirier Jul 16, 2026
bccc00a
Merge branch 'jlp_fast_llm_core' into fast-llm
jlamypoirier Jul 16, 2026
33442e9
Merge branch 'jlp_fast_llm_core' into fast-llm
jlamypoirier Jul 16, 2026
2f5526a
Merge branch 'jlp_fast_llm_metrics_configs' into fast-llm
jlamypoirier Jul 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Tests for PipelineRL vLLM integration."""
196 changes: 196 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
"""Pytest configuration and fixtures for vllm1 tests."""

import os
import pytest
import torch
import tempfile
from pathlib import Path
import subprocess
import sys

from pipelinerl.vllm1 import EngineManager


@pytest.fixture(scope="session")
def model_name():
"""Model to use for testing."""
return "Qwen/Qwen2.5-0.5B-Instruct"


@pytest.fixture(scope="session")
def sample_prompts():
"""Sample prompts for generation testing."""
return [
"Write a haiku about coding:",
"The capital of France is",
"In a galaxy far away,",
]


@pytest.fixture(scope="session")
def simple_prompt():
"""Single simple prompt for deterministic testing."""
return "The capital of France is"


@pytest.fixture(scope="session")
def num_gpus():
"""Number of GPUs available."""
return torch.cuda.device_count()


@pytest.fixture(scope="session")
def require_2_gpus(num_gpus):
"""Skip test if less than 2 GPUs available."""
if num_gpus < 2:
pytest.skip("Test requires at least 2 GPUs")


@pytest.fixture(scope="session")
def require_gpu():
"""Skip test if no GPU available."""
if not torch.cuda.is_available():
pytest.skip("Test requires GPU")


@pytest.fixture
def temp_dir():
"""Temporary directory for test files."""
with tempfile.TemporaryDirectory() as tmpdir:
yield Path(tmpdir)


@pytest.fixture(scope="session")
def shared_test_dir():
"""Session-scoped shared directory for test data that persists across tests.

Use this for data that needs to be shared between tests (like perturbed weights).
"""
with tempfile.TemporaryDirectory() as tmpdir:
yield Path(tmpdir)


@pytest.fixture
def distributed_init_method(temp_dir):
"""File-based init method for distributed testing."""
return f"file://{temp_dir}/dist_init"


@pytest.fixture(scope="session")
def shared_distributed_init_method(shared_test_dir):
"""Session-scoped file-based init method for tests that share data."""
return f"file://{shared_test_dir}/dist_init"


@pytest.fixture(scope="session")
def cache_dir():
"""Directory for caching downloaded models."""
cache_path = Path(os.environ.get("HF_HOME", Path.home() / ".cache" / "huggingface"))
cache_path.mkdir(parents=True, exist_ok=True)
return cache_path


@pytest.fixture
def vllm_server_port():
"""Port for vLLM server in tests."""
# Use a high port to avoid conflicts
return 8765


@pytest.fixture
def generation_config():
"""Configuration for deterministic generation."""
return {
"temperature": 0.0,
"top_p": 1.0,
"max_tokens": 50,
"seed": 42,
}


@pytest.fixture
def vllm_engine_factory_2gpu(model_name):
"""Factory fixture that defaults to 2 GPUs.

Usage:
async with vllm_engine_factory_2gpu() as manager:
# Uses 2 GPUs by default
# Access engine via manager.engine
...
"""
def _factory(tensor_parallel_size: int = 2, **kwargs):
"""Create engine with 2 GPUs by default."""
import argparse

args = argparse.Namespace(
model=model_name,
tensor_parallel_size=tensor_parallel_size,
disable_log_stats=True,
enable_log_requests=False,
**kwargs
)

return EngineManager.create_engine(args)

return _factory


@pytest.fixture
def vllm_engine_factory(model_name):
"""Factory fixture for creating vLLM engines.

Usage in tests:
async with vllm_engine_factory() as manager:
# use manager.engine for generation
...
# automatic cleanup

Or with custom config:
async with vllm_engine_factory(tensor_parallel_size=2) as manager:
# use manager.engine with 2 GPUs
...

Or if you need engine_config:
async with vllm_engine_factory() as manager:
# access manager.engine, manager.engine_config, manager.args
...
"""
def _factory(tensor_parallel_size: int = 1, **kwargs):
"""Create engine context manager with test defaults.

Args:
tensor_parallel_size: Number of GPUs
**kwargs: Additional attributes for args object

Returns:
Async context manager for EngineManager
"""
import argparse

# Create minimal args object with required attributes for AsyncEngineArgs.from_cli_args()
args = argparse.Namespace(
model=model_name,
tensor_parallel_size=tensor_parallel_size,
disable_log_stats=True,
enable_log_requests=False,
# Apply any additional kwargs
**kwargs
)

print("args: ", args)

return EngineManager.create_engine(args)

return _factory


@pytest.fixture
def distributed_trainer_helper():
"""Path to the distributed trainer helper script."""
return Path(__file__).parent / "distributed_trainer_helper.py"


@pytest.fixture
def vllm_engine_helper():
"""Path to the vLLM engine helper script."""
return Path(__file__).parent / "vllm_engine_helper.py"
Loading