MilesCranmer commited on
Commit
aaf3c83
1 Parent(s): b810fd2

Use temp equations in test

Browse files
Files changed (1) hide show
  1. test/test.py +4 -0
test/test.py CHANGED
@@ -25,6 +25,7 @@ class TestPipeline(unittest.TestCase):
25
  model_selection="accuracy",
26
  niterations=default_niterations * 2,
27
  populations=default_populations * 2,
 
28
  )
29
  self.rstate = np.random.RandomState(0)
30
  self.X = self.rstate.randn(100, 5)
@@ -186,6 +187,8 @@ class TestPipeline(unittest.TestCase):
186
  # We expect in this case that the "best"
187
  # equation should be the right one:
188
  model.set_params(model_selection="best")
 
 
189
  model.fit(self.X, y)
190
  self.assertLessEqual(model.get_best()[1]["loss"], 1e-2)
191
  self.assertLessEqual(model.get_best()[1]["loss"], 1e-2)
@@ -399,6 +402,7 @@ class TestMiscellaneous(unittest.TestCase):
399
  procs=0,
400
  multithreading=False,
401
  warm_start=False,
 
402
  ) # Return early.
403
 
404
  check_generator = check_estimator(model, generate_only=True)
 
25
  model_selection="accuracy",
26
  niterations=default_niterations * 2,
27
  populations=default_populations * 2,
28
+ temp_equation_file=True,
29
  )
30
  self.rstate = np.random.RandomState(0)
31
  self.X = self.rstate.randn(100, 5)
 
187
  # We expect in this case that the "best"
188
  # equation should be the right one:
189
  model.set_params(model_selection="best")
190
+ # Also try without a temp equation file:
191
+ model.set_params(temp_equation_file=False)
192
  model.fit(self.X, y)
193
  self.assertLessEqual(model.get_best()[1]["loss"], 1e-2)
194
  self.assertLessEqual(model.get_best()[1]["loss"], 1e-2)
 
402
  procs=0,
403
  multithreading=False,
404
  warm_start=False,
405
+ temp_equation_file=True,
406
  ) # Return early.
407
 
408
  check_generator = check_estimator(model, generate_only=True)