Closed drcassar closed 7 months ago
Very strange indeed. Are you able to run the unit tests without issue? i.e.,
python -m pysr test main
which internally calls this test suite: https://github.com/MilesCranmer/PySR/blob/b3a5026a02f28f97726476ab0f5b89eb29f809cb/pysr/test/test.py#L991 that is supposed to do fairly intensive tests of the units
Wait, I see the same bug... Okay this is definitely real.
Seems like self.y_units_
is being interpreted as a vector rather than a string somewhere...
Fixed by #545 btw. Fix is on PySR 0.17.1 which has been released.
What happened?
I tried the dimensional constraint tutorial (https://astroautomata.com/PySR/examples/#10-dimensional-constraints) in a new python environment with the newest version of PySR (v0.17.0) and it throws the error
juliacall.JuliaError: UndefVarError: "k" not defined
.The code is the same as the tutorial, but I created a gist of it if it helps: https://gist.github.com/drcassar/ad351bc48931f753c321eec214135513. Commenting lines 46 and 47 of the code makes it run without issues.
Version
0.17.0
Operating System
Linux
Package Manager
pip
Interface
Script (i.e.,
python my_script.py
)Relevant log output
Extra Info
No response