MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / _stop_profile

Method _stop_profile

fastdeploy/engine/common_engine.py:2400–2415  ·  view source on GitHub ↗

Stop profiling of the model server and reset variables.

(self)

Source from the content-addressed store, hash-verified

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 """

Callers 1

start_worker_serviceMethod · 0.95

Calls 6

start_cache_serviceMethod · 0.95
reset_cache_configMethod · 0.80
splitMethod · 0.80
pollMethod · 0.45
sleepMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected