v2.0.0-beta.1
Pre-release
Pre-release
What's Changed
Core PySR / Backend
PySR v2.0.0-beta.1 is the first beta release of PySR 2. It upgrades the Julia backend from SymbolicRegression.jl v2.0.0-alpha.9 to v2.0.0-beta.3 and introduces first-class mutation and plugin configuration.
Breaking changes
- Remove
ParametricExpressionSpecin favor ofTemplateExpressionSpecby @MilesCranmerBot in #1277 - Switch Slurm allocations to SlurmClusterManager.jl by @MilesCranmer in #794
- Enable simulated annealing by default, matching SymbolicRegression.jl, by @MilesCranmerBot in #1283
- Increase the default crossover probability to
0.2through the updated backend defaults - Enable adaptive mutation weights and automatic batching through the updated backend defaults
Saved search states using ParametricExpressionSpec cannot be loaded by PySR 2. Use TemplateExpressionSpec for structured expressions.
Mutations and plugins
- Expose first-class mutation configuration through
mutationsanddefault_mutationsby @MilesCranmerBot in #1282 - Expose plugin configuration through
pluginsanddefault_plugins, including simulated annealing, adaptive parsimony, adaptive mutation weights, and mutation bursts - Add configurable mutation objects, including
BacksolveMutation - Preserve the legacy
weight_*parameters while allowing mutation-specific settings through the new object interface
Search behavior and performance
- Delegate automatic batching to SymbolicRegression.jl while preserving explicit
batchingandbatch_sizesettings by @MilesCranmerBot in #1285 - Skip the unused Float64 SymbolicRegression.jl precompile workload for PySR's default Float32 configuration by @MilesCranmerBot in #1279
- Reuse evaluation buffers during search through the updated backend
- Improve backend precompilation time and compiled-cache size
Bug fixes
- Respect
tempdirwhen writing temporary equation files by @MilesCranmerBot in #1207 - Convert
TemplateExpressionSpec.num_featuresdictionary keys to Julia symbols by @MilesCranmerBot in #1209
Backend changes from SymbolicRegression.jl v2.0.0-alpha.9 to v2.0.0-beta.3
View the SymbolicRegression.jl changes included in this release
PySR v2.0.0-beta.1 upgrades SymbolicRegression.jl from v2.0.0-alpha.9 to v2.0.0-beta.3.
Backend release: https://github.com/astroautomata/SymbolicRegression.jl/releases/tag/v2.0.0-beta.3
Full backend changelog: astroautomata/SymbolicRegression.jl@v2.0.0-alpha.9...v2.0.0-beta.3
Mutation, crossover, and plugin interfaces
- Add first-class
AbstractMutationtypes and mutation-specific configuration by @MilesCranmer in astroautomata/SymbolicRegression.jl#610 - Add a composable plugin interface with simulated annealing, adaptive mutation weights, adaptive parsimony, and mutation-loop plugins by @MilesCranmerBot in astroautomata/SymbolicRegression.jl#645
- Add the backsolve mutation by @ayagh19 in astroautomata/SymbolicRegression.jl#573
- Add customizable crossovers through
AbstractCrossoverby @MilesCranmerBot in astroautomata/SymbolicRegression.jl#664 - Allow plugins to contribute default mutations and crossovers by @MilesCranmerBot in astroautomata/SymbolicRegression.jl#663
Defaults and search behavior
- Increase the default crossover probability by @MilesCranmerBot in astroautomata/SymbolicRegression.jl#643
- Enable adaptive mutation weights by default by @MilesCranmerBot in astroautomata/SymbolicRegression.jl#678
- Enable automatic batching for large datasets by @MilesCranmerBot in astroautomata/SymbolicRegression.jl#676
- Preserve the simulated-annealing temperature schedule by @MilesCranmerBot in astroautomata/SymbolicRegression.jl#652
Template expressions and custom value types
- Add generic optimizable parameters for template expressions by @adil-soubki in astroautomata/SymbolicRegression.jl#644
- Remove the dedicated
ParametricExpressionAPI in favor of template expressions by @MilesCranmerBot in astroautomata/SymbolicRegression.jl#656 - Adopt DynamicExpressions.jl 2.9 and its
EvalContextinterface by @MilesCranmerBot in astroautomata/SymbolicRegression.jl#668 - Preserve natural type promotion in
ValidVectoroperations by @MilesCranmerBot in astroautomata/SymbolicRegression.jl#625 - Support
SubArrayinputs ineval_grad_tree_arrayby @MilesCranmerBot in astroautomata/SymbolicRegression.jl#566
Performance
- Reuse evaluation buffers during search by @MilesCranmerBot in astroautomata/SymbolicRegression.jl#654
- Narrow the default precompile workload by @MilesCranmerBot in astroautomata/SymbolicRegression.jl#642
- Add mutation function barriers and avoid unnecessary deep copies in the search loop
Correctness and reliability
- Recompute costs after simplification by @MilesCranmerBot in astroautomata/SymbolicRegression.jl#550
- Fix constant-optimization restarts for zero-valued constants by @singhharsh1708 in astroautomata/SymbolicRegression.jl#637
- Prevent multiprocessing teardown hangs by @MilesCranmerBot in astroautomata/SymbolicRegression.jl#641
- Finalize logging only after every search output completes by @adil-soubki in astroautomata/SymbolicRegression.jl#646
- Report mismatched
Xandysample counts early by @MilesCranmerBot in astroautomata/SymbolicRegression.jl#660 - Cap crossover constraint retries correctly by @MilesCranmerBot in astroautomata/SymbolicRegression.jl#666
- Make stdin quit monitoring non-blocking by @MilesCranmerBot in astroautomata/SymbolicRegression.jl#562
- Disable simplification for expression-level losses by @MilesCranmerBot in astroautomata/SymbolicRegression.jl#674
- Mark Enzyme support as stable by @wsmoses in astroautomata/SymbolicRegression.jl#632
Packaging / Release / Dependencies
- Move PyPI publication to trusted publishing by @MilesCranmerBot in #1256
- Update repository links following the move to the
astroautomataorganization by @MilesCranmerBot in #1272 - Update Python, documentation, and GitHub Actions dependencies
CI / Testing / Automation
- Handle skipped scikit-learn estimator checks by @MilesCranmer in #1201
- Reduce low-signal GitHub Actions usage while preserving targeted pull-request coverage by @MilesCranmerBot in #1241
- Restore the large Docker nightly workflow by @MilesCranmerBot in #1259
Documentation / Website / Papers
- Add an agent skill describing effective PySR usage by @MilesCranmer in #1264
- Use Float32 literals in the custom-loss example by @MilesCranmerBot in #1276
- Expand the research-paper showcase with work on microbial growth, human mobility, wind turbines, skin friction, dark energy, biomass pyrolysis, angular coefficients, and stellar chaos
- Update the contributor list by @MilesCranmerBot in #1286
Full Changelog: v2.0.0a2...v2.0.0-beta.1