Skip to content

Commit

Permalink
Add turbo parameter with test
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Oct 31, 2022
1 parent c526fa1 commit 98ccd5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion pysr/sr.py
Expand Up @@ -1587,7 +1587,6 @@ def _run(self, X, y, mutated_params, weights, seed):
early_stop_condition=early_stop_condition,
seed=seed,
deterministic=self.deterministic,
extend_user_operators=False,
define_helper_functions=False,
)

Expand Down
3 changes: 2 additions & 1 deletion test/test.py
Expand Up @@ -70,12 +70,13 @@ def test_linear_relation_weighted(self):
print(model.equations_)
self.assertLessEqual(model.get_best()["loss"], 1e-4)

def test_multiprocessing(self):
def test_multiprocessing_turbo(self):
y = self.X[:, 0]
model = PySRRegressor(
**self.default_test_kwargs,
procs=2,
multithreading=False,
turbo=True,
early_stop_condition="stop_if(loss, complexity) = loss < 1e-4 && complexity == 1",
)
model.fit(self.X, y)
Expand Down

0 comments on commit 98ccd5e

Please sign in to comment.