Published February 12, 2024
| Version v0.17.0
Software
Open
MilesCranmer/PySR: v0.17.0
Authors/Creators
- 1. University of Cambridge
- 2. AAE @ Loughborough University
- 3. Scott Logic
- 4. Qualcomm AI Research
- 5. @JaneliaSciComp
- 6. @ml-gde
- 7. @deepsourcelabs
- 8. Beihang University
- 9. New York University
- 10. University of Tennessee, Knoxville
- 11. New York University Abu Dhabi
Description
What's Changed
- Bump docker/build-push-action from 3 to 5 by @dependabot in https://github.com/MilesCranmer/PySR/pull/510
- Bump actions/cache from 3 to 4 by @dependabot in https://github.com/MilesCranmer/PySR/pull/526
- Update colab notebook to use juliaup by @MilesCranmer in https://github.com/MilesCranmer/PySR/pull/531
- Bump peter-evans/create-pull-request from 5 to 6 by @dependabot in https://github.com/MilesCranmer/PySR/pull/539
- (BREAKING) Rewrite Julia interface with PyJulia -> JuliaCall; other changes by @MilesCranmer @cjdoris @mkitti in https://github.com/MilesCranmer/PySR/pull/535
Detailed changes from #535
- (BREAKING) Changed PyJulia with JuliaCall
- Need to change
eval->seval - Manually converting to
Vectorwhen calling SymbolicRegression.jl functions (otherwise would get passed asPyList{Any}; see https://github.com/JuliaPy/PythonCall.jl/issues/441) - Wrapped
equation_searchcode withjl.PythonCall.GC.disable()to avoid multithreading-related segfaults (https://github.com/JuliaPy/PythonCall.jl/issues/298) - Manually convert
np.str_tostrbefore passing tovariable_names, otherwise it becomes aPyArrayand not aString(might be worth adding a workaround, it seems like PyJulia does this automatically)
- Need to change
- (BREAKING) Julia is now installed automatically when you import
pysr(via JuliaCall) - (BREAKING) The user no longer needs to run
python -m pysr install. The install process is done by JuliaCall at import time.- Removed code related to
pysr.install()andpython -m pysr installbecause JuliaCall now handles this. python -m pysr installwill not give a warning and do nothing.
- Removed code related to
- (BREAKING) Remove the feynman problems dataset. Didn't seem good to have a dataset within a library itself.
- (BREAKING) Deprecated
julia_projectargument (ignored; no effect). The user now needs to set this up by customizingjuliapkg.json. See updated documentation for instructions. - (BREAKING) Switch from
python -m pysr.test [test]topython -m pysr test [test]. - Switches to
pyproject.tomlfor building rather thansetup.py. However,setup.py installshould still work. - Dependencies are now managed by pyjuliapkg rather than the custom code we made. Simplifies things a lot!
- Rather than storing the raw julia variables in
PySRRegressor, I am now storing a serialized version of them. This means you can now pickle the search state and warm-start the search from a file, in another Python process!- Not breaking! Because
self.raw_julia_state_will deserialize it automatically for you
- Not breaking! Because
- SymbolicRegression is now available to import from PySR:
from pysr import SymbolicRegression as SR
x1 = SR.Node(feature=1) # Create expressions manually
- SymbolicRegression options are accessible in
<model>.julia_options_(generated from a serialized format for pickle safety) so that the user can call a variety of functions inSymbolicRegression.jldirectly. - Deprecated various kwargs to match SymbolicRegression.jl (old names will still work, so this is not breaking):
ncyclesperiteration => ncycles_per_iterationloss => elementwise_lossfull_objective => loss_function
- Fixes Jupyter printing by automatically loading the
juliacall.ipythonextension at import time - Adds Zygote.jl to environment by default
- Does unittesting on an example Jupyter notebook
Full Changelog: https://github.com/MilesCranmer/PySR/compare/v0.16.9...v0.17.0
Files
MilesCranmer/PySR-v0.17.0.zip
Files
(2.4 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:bc036706776ab04cf212568564133a26
|
2.4 MB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/MilesCranmer/PySR/tree/v0.17.0 (URL)