Skip to content

Commit e3178dd

Browse files
authored
* fix None bug (#786)
1 parent a82c5e3 commit e3178dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

data_juicer/ops/base_op.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ def runtime_np(self):
229229
from loguru import logger
230230

231231
op_proc = calculate_np(self._name, self.mem_required, self.cpu_required, self.use_cuda(), self.gpu_required)
232-
op_proc = min(op_proc, self.num_proc)
232+
if self.num_proc is not None:
233+
op_proc = min(op_proc, self.num_proc)
233234
logger.debug(f"Op [{self._name}] running with number of procs:{op_proc}")
234235
return op_proc
235236

0 commit comments

Comments
 (0)