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

Method setUp

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

Source from the content-addressed store, hash-verified

60
61class BaseTrainerCase(RayUnittestBase):
62 def setUp(self):
63 ray.init(ignore_reinit_error=True)
64 self.config = get_template_config()
65 self.config.buffer.total_epochs = 2
66 self.config.buffer.batch_size = 4
67 self.config.model.model_path = get_model_path()
68 self.config.explorer.rollout_model.engine_type = "vllm"
69 self.config.algorithm.repeat_times = 3
70 self.config.project = "Trainer-unittest"
71 self.config.name = f"trainer-{datetime.now().strftime('%Y%m%d%H%M%S')}"
72 self.config.monitor.monitor_type = "tensorboard"
73 self.config.checkpoint_root_dir = get_checkpoint_path()
74 self.config.synchronizer.sync_interval = 2
75 self.config.synchronizer.sync_method = SyncMethod.NCCL
76 self.config.explorer.eval_interval = 4
77
78
79@parameterized_class(

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