Releases: MilesCranmer/PySR
v0.19.0
What's Changed
- BREAKING: Disable automatic sympy simplification by @MilesCranmer in #658
- Build: update numpy version by @MilesCranmer in #650
- Build: bump docker/build-push-action from 5 to 6 by @dependabot in #652
Full Changelog: v0.18.5...v0.19.0
v0.18.5
What's Changed
New features
-
Per-variable custom complexities by @MilesCranmer in #649
model.fit(X, y, complexity_of_variables=[1, 3]) # run a search with feature 1 having complexity 1 and feature 2 with complexity 3
-
Automatically suggest similar parameters by @MilesCranmer in #620
Other
- Bump julia-actions/cache from 1 to 2 by @dependabot in #621
- Update pysr_demo.ipynb by @VishalJ99 in #624
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #612
- Bump docker/login-action from 2 to 3 by @dependabot in #509
- More extensive typing stubs and associated refactoring by @MilesCranmer in #609
Full Changelog: v0.18.4...v0.18.5
Backend changes
New features
- Allow per-variable complexity (MilesCranmer/SymbolicRegression.jl#324) (@MilesCranmer)
Other
- ci: split up test suite into multiple runners (MilesCranmer/SymbolicRegression.jl#311) (@MilesCranmer)
- chore(deps): bump julia-actions/cache from 1 to 2 (MilesCranmer/SymbolicRegression.jl#315) (https://github.com/dependabot[bot])
- CompatHelper: bump compat for DynamicQuantities to 0.14, (keep existing compat) (MilesCranmer/SymbolicRegression.jl#317) (@github-actions[bot])
- Use DispatchDoctor.jl to wrap entire package with
@stable
(MilesCranmer/SymbolicRegression.jl#321) (@MilesCranmer) - CompatHelper: bump compat for MLJModelInterface to 1, (keep existing compat) (MilesCranmer/SymbolicRegression.jl#322) (@github-actions[bot])
- Mark more functions as stable (MilesCranmer/SymbolicRegression.jl#323) (@MilesCranmer)
- Refactor tests to use TestItems.jl (MilesCranmer/SymbolicRegression.jl#325) (@MilesCranmer)
Full Changelog: MilesCranmer/SymbolicRegression.jl@v0.24.4...v0.24.5
New Contributors
- @VishalJ99 made their first contribution in #624
v0.18.4
Frontend changes
- Add dimensionless constants mode; update Python version constraints; upgrade juliacall to 0.9.20 (#608) (@MilesCranmer)
- Fix sign typo in example docs (#611) (@hvaara)
Full Changelog: v0.18.3...v0.18.4
Backend changes
- Up to 40% speedup for default settings via more parallelism inside workers (MilesCranmer/SymbolicRegression.jl#304) (@MilesCranmer)
- feat: use
?
for wildcard units instead of⋅
(MilesCranmer/SymbolicRegression.jl#307) (@MilesCranmer) - refactor: fix some more type instabilities (MilesCranmer/SymbolicRegression.jl#308) (@MilesCranmer)
- refactor: remove unused Tricks dependency (MilesCranmer/SymbolicRegression.jl#309) (@MilesCranmer)
- Add option to force dimensionless constants (MilesCranmer/SymbolicRegression.jl#310) (@MilesCranmer)
Full Changelog: MilesCranmer/SymbolicRegression.jl@v0.24.2...v0.24.4
New Contributors
v0.18.3
Frontend changes
- Automated update to backend: v0.24.3 by @github-actions in #605
Full Changelog: v0.18.2...v0.18.3
Backend changes
Full Changelog: MilesCranmer/SymbolicRegression.jl@v0.24.1...v0.24.2
v0.18.2
Frontend changes
- Add missing
greater
operator in sympy mapping by @MilesCranmer in #590 - Bump julia-actions/setup-julia from 1 to 2 by @dependabot in #591
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #537
- Automated update to backend: v0.24.2 by @MilesCranmer in #598
Full Changelog: v0.18.1...v0.18.2
Backend changes
Merged pull requests:
- Bump julia-actions/setup-julia from 1 to 2 (MilesCranmer/SymbolicRegression.jl#300) (@dependabot[bot])
- [pre-commit.ci] pre-commit autoupdate (MilesCranmer/SymbolicRegression.jl#301) (@pre-commit-ci[bot])
- A small update on examples.md for 1-based indexing (MilesCranmer/SymbolicRegression.jl#302) (@liuyxpp)
- Fixes for Julia 1.11 (MilesCranmer/SymbolicRegression.jl#303) (@MilesCranmer)
Closed issues:
- API Overhaul (MilesCranmer/SymbolicRegression.jl#187)
- [Feature]: Training on high dimensions X (MilesCranmer/SymbolicRegression.jl#299)
Full Changelog: MilesCranmer/SymbolicRegression.jl@v0.24.1...v0.24.2
v0.18.1
What's Changed
- Revert GitHub-based registry for backend by @MilesCranmer in #587
Full Changelog: v0.18.0...v0.18.1
v0.18.0
Frontend changes
- fix TypeError when a variable name matches a builtin python function by @tomjelen in #558
- Update to backend: v0.24.0 by @MilesCranmer in #564
- Fix extensions not being added to package env by @MilesCranmer in #579
- Bump backend version and switch to GitHub-based registry by @MilesCranmer in #580
Backend changes
Filtered to only include relevant ones for Python frontend. Also note that not all backend features, like graph-based expressions/program synthesis, are supported yet, so I don't mention those changes yet.
-
(BREAKING) The
swap_operands
mutation contributed by @foxtran now has a default weight of 0.1 rather than 0.0. -
(BREAKING) The Dataset struct has had many of its field declared immutable, as a safety precaution.
- If you had relied on the mutability of the struct to set parameters after initializing it, or had changed any properties of the dataset within a loss function (which actually would break assumptions outside the loss function anyways), you will need to modify your code. Note you can always copy fields of the dataset to variables and then modify those variables
-
LoopVectorization.jl has been moved to a package extension. PySR will install automatically at first use of
turbo=True
rather than by default, which means faster install time and startup time.- Note that LoopVectorization will no longer result in improved performance in Julia 1.11 and thus
turbo=True
will have no effect on that version (due to internal changes in Julia), which is why I have instead done the following:
- Note that LoopVectorization will no longer result in improved performance in Julia 1.11 and thus
-
Bumper.jl support added. Passing
bumper=true
toPySRRegressor()
will result in faster performance.- Uses bump allocation (see rust package bumpalo for a good explanation) in the expression evaluation which can get speeds equivalent to LoopVectorization and sometimes even better due to better management of allocations rather than relying on garbage collection. Seems like a pretty good alternative, and doesn't rely on manipulating Julia internals for performance (MilesCranmer/SymbolicRegression.jl#287)
-
Various fixes to distributed compute; confirmed Slurm support again!
- Maybe from MilesCranmer/SymbolicRegression.jl#297 - ensures ClusterManagers.jl is loaded on workers
-
Now prefer to use new keyword-based constructors for nodes:
Node{T}(feature=...) # leaf referencing a particular feature column Node{T}(val=...) # constant value leaf Node{T}(op=1, l=x1) # operator unary node, using the 1st unary operator Node{T}(op=1, l=x1, r=1.5) # binary unary node, using the 1st binary operator
rather than the previous constructors Node(op, l, r) and Node(T; val=...) (though those will still work; just with a depwarn). If you did any construction of nodes manually, note the new syntax. (Old syntax will still work though)
-
Formatting overhaul of backend (MilesCranmer/SymbolicRegression.jl#278)
-
Upgraded Optim to 1.9
-
Upgraded DynamicQuantities to 0.13
-
Upgraded DynamicExpressions to 0.16
-
The main search loop in the backend has been greatly refactored for readability and improved type inference. It now looks like this (down from a monolithic ~1000 line function)
function _equation_search( datasets::Vector{D}, ropt::RuntimeOptions, options::Options, saved_state ) where {D<:Dataset} _validate_options(datasets, ropt, options) state = _create_workers(datasets, ropt, options) _initialize_search!(state, datasets, ropt, options, saved_state) _warmup_search!(state, datasets, ropt, options) _main_search_loop!(state, datasets, ropt, options) _tear_down!(state, ropt, options) return _format_output(state, ropt) end
Backend changes: MilesCranmer/SymbolicRegression.jl@v0.23.1...v0.24.1
New Contributors
Full Changelog: v0.17.4...v0.18.0
v0.17.4
Small patch to Julia version to avoid buggy libgomp in 1.10.1 and 1.10.2.
Full Changelog: v0.17.3...v0.17.4
v0.17.3
What's Changed
- Bump juliacall from 0.9.15 to 0.9.19 by @dependabot in #569
- Upstreamed patching of
seval
to support multiple expressions
- Upstreamed patching of
- remove repeated operator by @RaulPL in #573
New Contributors
Full Changelog: v0.17.2...v0.17.3
v0.17.2
What's Changed
- All cell state in bio image paper by @chris-soelistyo in #560
- Refactor update_backend.yml workflow by @sefffal in #562
- Limit to Julia 1.6.7-1.10.0 and 1.10.3+ by @MilesCranmer in #565
New Contributors
- @chris-soelistyo made their first contribution in #560
- @sefffal made their first contribution in #562
Full Changelog: v0.17.1...v0.17.2