Stop profiling of the model server and reset variables.
(self)
| 2398 | return p |
| 2399 | |
| 2400 | def _stop_profile(self): |
| 2401 | """ |
| 2402 | Stop profiling of the model server and reset variables. |
| 2403 | """ |
| 2404 | self.do_profile = 0 |
| 2405 | while self.get_profile_block_num_signal.value[0] == 0: |
| 2406 | if hasattr(self, "worker_proc") and self.worker_proc is not None: |
| 2407 | if self.worker_proc.poll() is not None: |
| 2408 | raise RuntimeError("Worker process failed to start." "Please check log/workerlog.* for details.") |
| 2409 | time.sleep(1) |
| 2410 | num_gpu_blocks = self.get_profile_block_num_signal.value[0] |
| 2411 | self.cfg.cache_config.reset(num_gpu_blocks) |
| 2412 | self.resource_manager.reset_cache_config(self.cfg.cache_config) |
| 2413 | if self.cfg.cache_config.enable_prefix_caching or self.cfg.scheduler_config.splitwise_role != "mixed": |
| 2414 | device_ids = self.cfg.parallel_config.device_ids.split(",") |
| 2415 | self.cache_manager_processes = self.start_cache_service(device_ids, self.ipc_signal_suffix) |
| 2416 | |
| 2417 | def check_health(self, time_interval_threashold=30): |
| 2418 | """ |
no test coverage detected