Skip to content

Commit

Permalink
Limit default --num-workers
Browse files Browse the repository at this point in the history
  • Loading branch information
nagadomi committed Feb 7, 2023
1 parent e09bd87 commit b28276d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nunif/training/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def create_trainer_default_parser():
parser = argparse.ArgumentParser(
add_help=False,
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
num_workers = cpu_count() - 2
num_workers = min(cpu_count() - 2, 8)
if not num_workers > 0:
num_workers = cpu_count()

Expand Down

0 comments on commit b28276d

Please sign in to comment.