(self)
| 440 | |
| 441 | class ServeTest(RayUnittestBaseAsync): |
| 442 | def setUp(self): |
| 443 | self.config = get_template_config() |
| 444 | self.config.name = f"explorer-test-{datetime.now().strftime('%Y%m%d%H%M%S')}" |
| 445 | self.config.mode = "serve" |
| 446 | self.config.model.model_path = get_model_path() |
| 447 | self.config.explorer.rollout_model.engine_type = "vllm" |
| 448 | self.config.algorithm.repeat_times = 1 |
| 449 | self.config.monitor.monitor_type = "tensorboard" |
| 450 | self.config.project = "Trinity-unittest" |
| 451 | self.config.explorer.rollout_model.engine_num = 4 |
| 452 | self.config.explorer.rollout_model.enable_openai_api = True |
| 453 | self.config.checkpoint_root_dir = get_checkpoint_path() |
| 454 | self.config.explorer.proxy_port = 8010 |
| 455 | self.config.explorer.service_status_check_interval = 30 |
| 456 | self.config.buffer.trainer_input.experience_buffer = ExperienceBufferConfig( |
| 457 | name="experience_buffer", |
| 458 | storage_type=StorageType.SQL.value, |
| 459 | ) |
| 460 | self.config.check_and_update() |
| 461 | if multiprocessing.get_start_method(allow_none=True) != "spawn": |
| 462 | multiprocessing.set_start_method("spawn", force=True) |
| 463 | |
| 464 | async def test_serve(self): # noqa: C901 |
| 465 | serve_process = multiprocessing.Process(target=run_serve, args=(self.config,)) |
nothing calls this directly
no test coverage detected