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:
273
273
self .pending_jobs_lock = threading .Lock ()
274
274
275
275
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 )
277
277
self .max_cuda = cuda_version_and_device_count ()[1 ]
278
278
self .allocated_ram = float (0 )
279
279
self .allocated_cores = float (0 )
@@ -429,7 +429,7 @@ def run_jobs(
429
429
logger : logging .Logger ,
430
430
runtime_context : RuntimeContext ,
431
431
) -> None :
432
- self .taskqueue : TaskQueue = TaskQueue (threading .Lock (), psutil .cpu_count ())
432
+ self .taskqueue : TaskQueue = TaskQueue (threading .Lock (), psutil .cpu_count () or 1 )
433
433
try :
434
434
jobiter = process .job (job_order_object , self .output_callback , runtime_context )
435
435
You can’t perform that action at this time.
0 commit comments