MilesCranmer commited on
Commit
b2f8a6f
1 Parent(s): f9efd1b

Fix early_stop_condition setting if None

Browse files
Files changed (1) hide show
  1. pysr/sr.py +3 -1
pysr/sr.py CHANGED
@@ -1311,7 +1311,9 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
1311
  complexity_of_operators = Main.eval(complexity_of_operators_str)
1312
 
1313
  custom_loss = Main.eval(self.loss)
1314
- early_stop_condition = Main.eval(str(self.early_stop_condition))
 
 
1315
 
1316
  mutation_weights = np.array(
1317
  [
 
1311
  complexity_of_operators = Main.eval(complexity_of_operators_str)
1312
 
1313
  custom_loss = Main.eval(self.loss)
1314
+ early_stop_condition = Main.eval(
1315
+ str(self.early_stop_condition) if self.early_stop_condition else None
1316
+ )
1317
 
1318
  mutation_weights = np.array(
1319
  [