Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
trinity-node-1:
image: trinity-rft-megatron:latest-unittest
image: trinity-rft-unittest:20250918
pull_policy: never
command: sh -c "pip install -e .[dev] && ray start --head --dashboard-host 0.0.0.0 --include-dashboard true --block"
environment:
Expand Down Expand Up @@ -28,7 +28,7 @@ services:
capabilities: [gpu]

trinity-node-2:
image: trinity-rft-megatron:latest-unittest
image: trinity-rft-unittest:20250918
pull_policy: never
command: sh -c "pip install -e .[dev] && ray start --address=trinity-node-1:6379 --block"
environment:
Expand Down
2 changes: 0 additions & 2 deletions benchmark/config/countdown-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ buffer:
experience_buffer:
name: experience_buffer
storage_type: queue
path: ''
use_priority_queue: true
replay_buffer_kwargs:
priority_fn: linear_decay
Expand Down Expand Up @@ -133,7 +132,6 @@ trainer:
default_hdfs_dir: null
remove_previous_ckpt_in_save: false
del_local_ckpt_after_load: false
val_before_train: false
max_actor_ckpt_to_keep: null
max_critic_ckpt_to_keep: null
critic:
Expand Down
2 changes: 0 additions & 2 deletions benchmark/config/gsm8k-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ buffer:
experience_buffer:
name: experience_buffer
storage_type: queue
path: ''
use_priority_queue: true
replay_buffer_kwargs:
priority_fn: linear_decay
Expand Down Expand Up @@ -131,7 +130,6 @@ trainer:
default_hdfs_dir: null
remove_previous_ckpt_in_save: false
del_local_ckpt_after_load: false
val_before_train: false
max_actor_ckpt_to_keep: null
max_critic_ckpt_to_keep: null
monitor:
Expand Down
1 change: 0 additions & 1 deletion docs/sphinx_doc/source/tutorial/trinity_configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,6 @@ trainer:
default_hdfs_dir: null
remove_previous_ckpt_in_save: False
del_local_ckpt_after_load: False
val_before_train: False
max_actor_ckpt_to_keep: 5
max_critic_ckpt_to_keep: 5
```
Expand Down
1 change: 0 additions & 1 deletion docs/sphinx_doc/source_zh/tutorial/trinity_configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,6 @@ trainer:
default_hdfs_dir: null
remove_previous_ckpt_in_save: False
del_local_ckpt_after_load: False
val_before_train: False
max_actor_ckpt_to_keep: 5
max_critic_ckpt_to_keep: 5
```
Expand Down
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ agent = [
"agentscope"
]
rm_gallery = [
"rm-gallery>=0.1.1"
"rm-gallery>=0.1.5"
]
dev = [
"pre-commit>=2.17.0",
Expand Down Expand Up @@ -123,6 +123,3 @@ known_third_party = ["wandb"]
[project.urls]
"Homepage" = "https://github.com/modelscope/Trinity-RFT"
"Documentation" = "https://modelscope.github.io/Trinity-RFT/"

[tool.uv]
override-dependencies=["math_verify>=0.8.0"] # rm-gallery requires math_verify<0.8.0 which is not compatible with trinity-rft
2 changes: 1 addition & 1 deletion scripts/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN apt update && apt install -y \
python3 python3-pip python3-dev python3-packaging \
libomp-dev infiniband-diags libibverbs-dev librdmacm-dev rdma-core perftest \
&& rm -rf /var/lib/apt/lists/* \
&& ln -sf /usr/bin/python3 /usr/bin/python
&& ln -sf /usr/bin/python3 /usr/bin/python \
&& ln -sf /usr/bin/pip3 /usr/bin/pip


Expand Down
2 changes: 1 addition & 1 deletion scripts/docker_for_megatron/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN apt update && apt install -y \
python3 python3-pip python3-dev python3-packaging \
libomp-dev infiniband-diags libibverbs-dev librdmacm-dev rdma-core perftest \
&& rm -rf /var/lib/apt/lists/* \
&& ln -sf /usr/bin/python3 /usr/bin/python
&& ln -sf /usr/bin/python3 /usr/bin/python \
&& ln -sf /usr/bin/pip3 /usr/bin/pip

# For Aliyun users: update pip mirror to aliyun to speed up pip install
Expand Down
28 changes: 11 additions & 17 deletions tests/common/vllm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def setUp(self):
pprint(self.config)
self.engines, self.auxiliary_engines = create_inference_models(self.config)
self.model_wrapper = ModelWrapper(
self.engines[0], model_type="vllm_async", enable_history=self.enable_history
self.engines[0], engine_type="vllm", enable_history=self.enable_history
)

async def test_generate(
Expand Down Expand Up @@ -240,7 +240,7 @@ def setUp(self):
self.config.check_and_update()

self.engines, self.auxiliary_engines = create_inference_models(self.config)
self.model_wrapper = ModelWrapper(self.engines[0], model_type="vllm", enable_history=True)
self.model_wrapper = ModelWrapper(self.engines[0], engine_type="vllm", enable_history=True)

def test_model_len(self):
messages = [
Expand Down Expand Up @@ -277,7 +277,7 @@ def setUp(self):
self.config = get_template_config()
self.config.mode = "explore"
self.config.model.model_path = get_model_path()
self.config.explorer.rollout_model.engine_type = "vllm_async"
self.config.explorer.rollout_model.engine_type = "vllm"
self.config.explorer.rollout_model.engine_num = 1
self.config.explorer.rollout_model.tensor_parallel_size = 1
self.config.explorer.rollout_model.use_v1 = True
Expand All @@ -286,11 +286,9 @@ def setUp(self):

self.config.check_and_update()
self.engines, self.auxiliary_engines = create_inference_models(self.config)
self.model_wrapper = ModelWrapper(
self.engines[0], model_type="vllm_async", enable_history=True
)
self.model_wrapper = ModelWrapper(self.engines[0], engine_type="vllm", enable_history=True)
self.model_wrapper_no_history = ModelWrapper(
self.engines[0], model_type="vllm_async", enable_history=False
self.engines[0], engine_type="vllm", enable_history=False
)

def test_api(self):
Expand Down Expand Up @@ -348,7 +346,7 @@ def setUp(self):
self.config = get_template_config()
self.config.mode = "explore"
self.config.model.model_path = get_model_path()
self.config.explorer.rollout_model.engine_type = "vllm_async"
self.config.explorer.rollout_model.engine_type = "vllm"
self.config.explorer.rollout_model.engine_num = 1
self.config.explorer.rollout_model.tensor_parallel_size = 1
self.config.explorer.rollout_model.use_v1 = True
Expand All @@ -357,11 +355,9 @@ def setUp(self):

self.config.check_and_update()
self.engines, self.auxiliary_engines = create_inference_models(self.config)
self.model_wrapper = ModelWrapper(
self.engines[0], model_type="vllm_async", enable_history=True
)
self.model_wrapper = ModelWrapper(self.engines[0], engine_type="vllm", enable_history=True)
self.model_wrapper_no_history = ModelWrapper(
self.engines[0], model_type="vllm_async", enable_history=False
self.engines[0], engine_type="vllm", enable_history=False
)

async def test_api_async(self):
Expand Down Expand Up @@ -537,7 +533,7 @@ def setUp(self):
self.config = get_template_config()
self.config.mode = "explore"
self.config.model.model_path = get_api_model_path()
self.config.explorer.rollout_model.engine_type = "vllm_async"
self.config.explorer.rollout_model.engine_type = "vllm"
self.config.explorer.rollout_model.engine_num = 1
self.config.explorer.rollout_model.tensor_parallel_size = 1
self.config.explorer.rollout_model.use_v1 = True
Expand All @@ -551,11 +547,9 @@ def setUp(self):

self.config.check_and_update()
self.engines, self.auxiliary_engines = create_inference_models(self.config)
self.model_wrapper = ModelWrapper(
self.engines[0], model_type="vllm_async", enable_history=True
)
self.model_wrapper = ModelWrapper(self.engines[0], engine_type="vllm", enable_history=True)
self.model_wrapper_no_history = ModelWrapper(
self.engines[0], model_type="vllm_async", enable_history=False
self.engines[0], engine_type="vllm", enable_history=False
)

def test_api_tool_calls(self):
Expand Down
1 change: 0 additions & 1 deletion tests/template/verl_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,5 @@ trainer:
default_hdfs_dir: null
remove_previous_ckpt_in_save: False
del_local_ckpt_after_load: False
val_before_train: False
max_actor_ckpt_to_keep: 1
max_critic_ckpt_to_keep: 1
2 changes: 1 addition & 1 deletion trinity/buffer/storage/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class FileStorage:
"""

def __init__(self, storage_config: StorageConfig, config: BufferConfig) -> None:
if storage_config.path is None:
if not storage_config.path:
storage_config.path = default_storage_path(storage_config, config)
ext = os.path.splitext(storage_config.path)[-1]
if ext != ".jsonl" and ext != ".json":
Expand Down
2 changes: 1 addition & 1 deletion trinity/buffer/storage/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def __init__(self, storage_config: StorageConfig, config: BufferConfig) -> None:
self.queue = QueueBuffer.get_queue(storage_config, config)
st_config = deepcopy(storage_config)
st_config.wrap_in_ray = False
if st_config.path is not None:
if st_config.path:
if is_database_url(st_config.path):
from trinity.buffer.writer.sql_writer import SQLWriter

Expand Down
Loading