Spaces:
Sleeping
Sleeping
MilesCranmer
commited on
Commit
•
0b521f3
1
Parent(s):
af8d4da
Assert that old test outputs Float32 hall of fame
Browse files- test/test.py +5 -0
test/test.py
CHANGED
@@ -197,6 +197,11 @@ class TestPipeline(unittest.TestCase):
|
|
197 |
warm_start=True,
|
198 |
early_stop_condition=None,
|
199 |
)
|
|
|
|
|
|
|
|
|
|
|
200 |
# This should exit almost immediately, and use the old equations
|
201 |
regressor.fit(X, y)
|
202 |
|
|
|
197 |
warm_start=True,
|
198 |
early_stop_condition=None,
|
199 |
)
|
200 |
+
# Check that the the julia state is saved:
|
201 |
+
from pysr.sr import Main
|
202 |
+
# We should have that the model state is now a Float32 hof:
|
203 |
+
Main.test_state = regressor.raw_julia_state_
|
204 |
+
self.assertTrue(Main.eval("typeof(test_state[2]).parameters[1] == Float32"))
|
205 |
# This should exit almost immediately, and use the old equations
|
206 |
regressor.fit(X, y)
|
207 |
|