Closed noneaddress closed 11 months ago
Thanks very much for the bug report. This looks like the scikit-learn version being installed is out-of-date, so I either need to implement a version requirement, or need to add a fallback method.
Let me know if you still run into any issues
Let me know if you still run into any issues
Hi Miles Cranmer. pysr
runs normally after upgrading to 0.15.1 with pip. However, I encountered these warnings .
`UserWarning: `torch` was loaded before the Julia instance started. This may cause a segfault when running `PySRRegressor.fit`. To avoid this, please run `pysr.julia_helpers.init_julia()` *before* importing `torch`. For updates, see https://github.com/pytorch/pytorch/issues/78829
"`torch` was loaded before the Julia instance started. "`
`E:\CondaFolder\envs\env_one\lib\site-packages\pysr\julia_helpers.py:209: UserWarning: Your system's Python library is static (e.g., conda), so precompilation will be turned off. For a dynamic library, try using `pyenv` and installing with `--enable-shared`: https://github.com/pyenv/pyenv/blob/master/plugins/python-build/README.md#building-with---enable-shared.
"Your system's Python library is static (e.g., conda), so precompilation will be turned off. For a dynamic library, try using `pyenv` and installing with `--enable-shared`: https://github.com/pyenv/pyenv/blob/master/plugins/python-build/README.md#building-with---enable-shared."`
It provides detailed info, and I am confident to handle these. Thank you for developing pysr
and fixing the bug so quickly~
Cool. Yes, those warnings are unrelated – feel free to address if you desire.
What happened?
I use anaconda to manage my Python pkgs. But
conda install -c conda-forge pysr
failed to installpysr
because it spent lots of time on solving environment. Thus I installed Julia andpysr
with pip in conda prompt. However, when running demos in Quickstart section of README.md, an error occurred.TypeError: _check_feature_names_in() got an unexpected keyword argument 'generate_names'
Version
0.15.0
Operating System
Windows
Package Manager
pip
Interface
IPython Terminal
Relevant log output
Extra Info
Here is the script.
I created a new anaconda env and installed pysr in it. Both the envs throw the same error. I have run
pysr.install()
in these two envs before running the script above. I usedDebug
in Pycharm and found that function_check_feature_names_in
defined in\Lib\site-packages\sklearn\utils\validation.py
only hasinput_features=None
. Whengenerate_names=False
in_check_feature_names_in
(line 1441 in \Lib\site-packages\pysr\sr.py) is commented, the script runs normally. And I got the following results.I wonder whether there are something wrong with my pkgs or project structures. Looking forward to your reply.
Besides, when I add
print(model.latex_table(precision=3, include_score=True))
at the end of the above script, an error occurred.TypeError: latex_table() got an unexpected keyword argument 'include_score'
I just started learning programming, and my English is not very proficient. Please forgive me if I have offended or made low-level mistakes.
Best, Ker