(self)
| 1728 | |
| 1729 | class 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.""" |
nothing calls this directly
no test coverage detected