-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: PySRRegressor.from_file throws AttributeError #700
Comments
Yes this seems to be the cause. That variable was only introduced more recently. However this seems like it would be a common enough issue with pickle so I’m assuming there’s some sort of easy workaround we can use? |
I guess maybe the error is inevitable. Though it would be nicer if PySR could print a nicer error, maybe by saving the PySR version used to create the pickle file. |
I have found a workaround by inspecting the error a bit closer. The problem is in So a workaround is in the
This then no longer throws the error. Should I try to suggest it in the code? |
I've created a pull request, but maybe you want to add a warning when |
What happened?
When loading a saved model with
from_file
, an AttributeError is thrown:I am using version 0.18.4 and it is possible that the model I am loading was saved under an older version (0.17.2 maybe) - could that be the problem?
Version
0.18.4
Operating System
Linux
Package Manager
pip
Interface
Script (i.e.,
python my_script.py
)Relevant log output
Extra Info
No response
The text was updated successfully, but these errors were encountered: