MilesCranmer commited on
Commit
9049df4
1 Parent(s): 215a7a1

Add warning that the Julia state is being reset

Browse files
Files changed (1) hide show
  1. pysr/sr.py +7 -0
pysr/sr.py CHANGED
@@ -1464,6 +1464,13 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
1464
  if self.warm_start and hasattr(self, "raw_julia_state_"):
1465
  pass
1466
  else:
 
 
 
 
 
 
 
1467
  self.equations_ = None
1468
  self.nout_ = 1
1469
  self.selection_mask_ = None
 
1464
  if self.warm_start and hasattr(self, "raw_julia_state_"):
1465
  pass
1466
  else:
1467
+ if hasattr(self, "raw_julia_state_"):
1468
+ warnings.warn(
1469
+ "The discovered expressions are being reset. "
1470
+ "Please set `warm_start=True` if you wish to continue "
1471
+ "to start a search where you left off.",
1472
+ )
1473
+
1474
  self.equations_ = None
1475
  self.nout_ = 1
1476
  self.selection_mask_ = None