diff --git a/api/onnx_web/utils.py b/api/onnx_web/utils.py index 4a412364..104cf99e 100644 --- a/api/onnx_web/utils.py +++ b/api/onnx_web/utils.py @@ -1,6 +1,7 @@ import gc from logging import getLogger from os import environ, path +import threading from typing import Any, Dict, List, Optional, Union import torch @@ -135,7 +136,7 @@ def get_size(val: Union[int, str, None]) -> SizeChart: def run_gc(devices: List[DeviceParams] = []): - logger.debug("running garbage collection") + logger.debug("running garbage collection with %s active threads", threading.active_count()) gc.collect() if torch.cuda.is_available():