MilesCranmer commited on
Commit
501ebd3
1 Parent(s): f56fdcb

Change default procs to be # of cores

Browse files
Files changed (1) hide show
  1. pysr/sr.py +2 -1
pysr/sr.py CHANGED
@@ -13,6 +13,7 @@ import shutil
13
  from pathlib import Path
14
  from datetime import datetime
15
  import warnings
 
16
 
17
  global_state = dict(
18
  equation_file="hall_of_fame.csv",
@@ -74,7 +75,7 @@ def pysr(
74
  weights=None,
75
  binary_operators=None,
76
  unary_operators=None,
77
- procs=4,
78
  loss="L2DistLoss()",
79
  populations=20,
80
  niterations=100,
 
13
  from pathlib import Path
14
  from datetime import datetime
15
  import warnings
16
+ from multiprocessing import cpu_count
17
 
18
  global_state = dict(
19
  equation_file="hall_of_fame.csv",
 
75
  weights=None,
76
  binary_operators=None,
77
  unary_operators=None,
78
+ procs=cpu_count(),
79
  loss="L2DistLoss()",
80
  populations=20,
81
  niterations=100,