File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,7 @@ def __init__(self) -> None:
273273 self .pending_jobs_lock = threading .Lock ()
274274
275275 self .max_ram = int (psutil .virtual_memory ().available / 2 ** 20 )
276- self .max_cores = float (psutil .cpu_count ())
276+ self .max_cores = float (psutil .cpu_count () or 1 )
277277 self .max_cuda = cuda_version_and_device_count ()[1 ]
278278 self .allocated_ram = float (0 )
279279 self .allocated_cores = float (0 )
@@ -429,7 +429,7 @@ def run_jobs(
429429 logger : logging .Logger ,
430430 runtime_context : RuntimeContext ,
431431 ) -> None :
432- self .taskqueue : TaskQueue = TaskQueue (threading .Lock (), psutil .cpu_count ())
432+ self .taskqueue : TaskQueue = TaskQueue (threading .Lock (), psutil .cpu_count () or 1 )
433433 try :
434434 jobiter = process .job (job_order_object , self .output_callback , runtime_context )
435435
You can’t perform that action at this time.
0 commit comments