MCPcopy Create free account
hub / github.com/agentscope-ai/Trinity-RFT / setUp

Method setUp

tests/trainer/trainer_test.py:1730–1742  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1728
1729class ColocateModeTest(RayUnittestBase):
1730 def setUp(self) -> None:
1731 ray.init(ignore_reinit_error=True)
1732 self.config = get_template_config()
1733 self.config.mode = "colocate"
1734 self.config.cluster.node_num = 1
1735 self.config.cluster.gpu_per_node = 1
1736 self.config.project = "Trainer-unittest"
1737 self.config.name = f"trainer-{datetime.now().strftime('%Y%m%d%H%M%S')}"
1738 self.config.model.model_path = get_model_path()
1739 self.config.checkpoint_root_dir = get_checkpoint_path()
1740 self.config.explorer.rollout_model.engine_num = 1
1741 self.config.trainer.ulysses_sequence_parallel_size = 1
1742 self.config.synchronizer.sync_method = SyncMethod.MEMORY
1743
1744 def test_trainer(self):
1745 """Test colocate mode with both trainer and explorer."""

Callers

nothing calls this directly

Calls 3

get_template_configFunction · 0.90
get_model_pathFunction · 0.90
get_checkpoint_pathFunction · 0.90

Tested by

no test coverage detected