MCPcopy
hub / github.com/InternLM/lmdeploy / cleanup

Method cleanup

autotest/utils/proxy_distributed_utils.py:289–298  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

287 raise RuntimeError(f'API Server failed to register model: {self.model_name}')
288
289 def cleanup(self):
290 if self.api_process and self.api_process.poll() is None:
291 print(f'[API Server] Terminating for model: {self.model_path}')
292 self.api_process.terminate()
293 try:
294 self.api_process.wait(timeout=15)
295 except subprocess.TimeoutExpired:
296 self.api_process.kill()
297 if hasattr(self, '_log_file') and self._log_file and not self._log_file.closed:
298 self._log_file.close()

Calls 2

waitMethod · 0.45
closeMethod · 0.45