Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
1f3aace
1
Parent(s):
0445487
In high precision test, only check output type
Browse files- test/test.py +2 -8
test/test.py
CHANGED
@@ -86,18 +86,12 @@ class TestPipeline(unittest.TestCase):
|
|
86 |
y = 1.23456789 * self.X[:, 0]
|
87 |
model = PySRRegressor(
|
88 |
**self.default_test_kwargs,
|
89 |
-
early_stop_condition="stop_if(loss, complexity) = loss < 1e-
|
90 |
precision=64,
|
91 |
parsimony=0.01,
|
|
|
92 |
)
|
93 |
model.fit(self.X, y)
|
94 |
-
self.assertTrue(
|
95 |
-
any(
|
96 |
-
"1.23456789" in row["equation"]
|
97 |
-
for _, row in model.equations_.iterrows()
|
98 |
-
)
|
99 |
-
)
|
100 |
-
|
101 |
from pysr.sr import Main
|
102 |
|
103 |
# We should have that the model state is now a Float64 hof:
|
|
|
86 |
y = 1.23456789 * self.X[:, 0]
|
87 |
model = PySRRegressor(
|
88 |
**self.default_test_kwargs,
|
89 |
+
early_stop_condition="stop_if(loss, complexity) = loss < 1e-4 && complexity == 3",
|
90 |
precision=64,
|
91 |
parsimony=0.01,
|
92 |
+
warm_start=True,
|
93 |
)
|
94 |
model.fit(self.X, y)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
from pysr.sr import Main
|
96 |
|
97 |
# We should have that the model state is now a Float64 hof:
|