fix(api): log number of active threads when running GC (#170)
This commit is contained in:
parent
aec44aaaeb
commit
d09446ca68
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue