MilesCranmer commited on
Commit
1f01976
1 Parent(s): 58e25a9

Don't check for `equation_file_` until after checkpoint_file set

Browse files
Files changed (1) hide show
  1. pysr/sr.py +1 -1
pysr/sr.py CHANGED
@@ -1642,10 +1642,10 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
1642
  checkpoint_file : str, default=None
1643
  Path to checkpoint hall of fame file to be loaded.
1644
  """
1645
- check_is_fitted(self, attributes=["equation_file_"])
1646
  if checkpoint_file:
1647
  self.equation_file_ = checkpoint_file
1648
  self.equation_file_contents_ = None
 
1649
  self.equations_ = self.get_hof()
1650
 
1651
  def predict(self, X, index=None):
 
1642
  checkpoint_file : str, default=None
1643
  Path to checkpoint hall of fame file to be loaded.
1644
  """
 
1645
  if checkpoint_file:
1646
  self.equation_file_ = checkpoint_file
1647
  self.equation_file_contents_ = None
1648
+ check_is_fitted(self, attributes=["equation_file_"])
1649
  self.equations_ = self.get_hof()
1650
 
1651
  def predict(self, X, index=None):