Set workers=0 for MPS Train and Val modes (#4697)
This commit is contained in:
parent
2bc6e647c7
commit
a4fabfdacf
14 changed files with 88 additions and 74 deletions
|
|
@ -144,7 +144,7 @@ class BaseValidator:
|
|||
else:
|
||||
raise FileNotFoundError(emojis(f"Dataset '{self.args.data}' for task={self.args.task} not found ❌"))
|
||||
|
||||
if self.device.type == 'cpu':
|
||||
if self.device.type in ('cpu', 'mps'):
|
||||
self.args.workers = 0 # faster CPU val as time dominated by inference, not dataloading
|
||||
if not pt:
|
||||
self.args.rect = False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue