Skip to content

Update pysr requirement from <=1.5.10,>=1.5.0 to >=1.5.0,<=2.0.0 - #64

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/pysr-gte-1.5.0-and-lte-2.0.0
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/pysr-gte-1.5.0-and-lte-2.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 31, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on pysr to permit the latest version.

Release notes

Sourced from pysr's releases.

v2.0.0

PySR 2.0.0 is the result a two-year transformation of the library into a modular framework for symbolic learning while keeping the familiar v1 algorithm as a default. Operators can take any number of arguments, TypeSpec supports user-defined value types, and mutations, crossovers, and the search loop are configurable objects that can be changed entirely. This also introduces "guesses", which let you pass a guess for the expression - these get mixed into populations throughout a run (helps connect PySR to agentic coding loops as a tool). Automatic batching and a reusable backend evaluation buffer also make large searches faster.


Highlights

Operators with any number of arguments

operators takes an arity-keyed dict, so ternary operators like clamp, fma, and muladd, along with max/min over three or more arguments, are searchable (#999). Before v2 you had to fake clamp(x0*x1, -1, 1) as a tall nest of binary operators, which the search rarely found and never found cheaply. binary_operators and unary_operators still work, and they are mutually exclusive with operators.

from pysr import PySRRegressor
model = PySRRegressor(
operators={1: ["sin"], 2: ["+", "*", "-"], 3: ["clamp", "fma"]},
niterations=40,
)
model.fit(X, y)

The node type became Node{T,D} in DynamicExpressions (#127), where D is the maximum arity, and SymbolicRegression.jl generalized mutation, crossover, constraint checking, and dimensional analysis over it (#471, #472, #464).

constraints entries must now match operator arity exactly: a tuple of length N for an N-argument operator, else ValueError: Operator '<op>' has arity N but constraint tuple has length M. Unary operators still default to -1, and arity 2 and above default to tuple([-1] * arity).

SymPy export keeps up (#999): Max(*args) and Min(*args) replace the old two-argument Piecewise form, and fma, muladd, and clamp gained mappings. That is what makes these operators usable outside Julia.

Seed the search with guesses

Give PySR any guess for the final expressions, and it mixes those guesses into the populations throughout the search (#999; backend #469, #500). When should_optimize_constants=True, constants in a guess are optimized before the candidate enters the population, so the structure can be useful even when its initial constants are inaccurate. fraction_replaced_guesses controls the fraction of each population drawn from guesses at the end of every cycle. Guesses also support custom value types (#1316).

from pysr import PySRRegressor
model = PySRRegressor(
binary_operators=["+", "*"],
unary_operators=["sin"],
guesses=["sin(x0 * 2.1 - 0.5)", "x0 * 3.0 + x2"],
fraction_replaced_guesses=0.01,
)
model.fit(X, y)

... (truncated)

Changelog

Sourced from pysr's changelog.

2.0.0 (2026-08-25)

PySR 2.0.0 brings a two-year transformation of the library into the Python API, moving from a fixed scalar-tree search interface to a modular PyTorch-like framework for symbolic learning while keeping the familiar v1 estimator workflow. Operators can take any number of arguments, TypeSpec supports user-defined value types, and mutations, crossovers, and the search loop are configurable objects. Guesses mix expressions into populations throughout a run, which helps connect PySR to agentic coding loops. Automatic batching and a reusable backend evaluation buffer make large searches faster with less configuration.


Highlights

Operators with any number of arguments

operators takes an arity-keyed dict, so ternary operators like clamp, fma, and muladd, along with max/min over three or more arguments, are searchable (#999). Before v2 you had to fake clamp(x0*x1, -1, 1) as a tall nest of binary operators, which the search rarely found and never found cheaply. binary_operators and unary_operators still work, and they are mutually exclusive with operators.

from pysr import PySRRegressor
model = PySRRegressor(
operators={1: ["sin"], 2: ["+", "*", "-"], 3: ["clamp", "fma"]},
niterations=40,
)
model.fit(X, y)

The node type became Node{T,D} in DynamicExpressions (#127), where D is the maximum arity, and SymbolicRegression.jl generalized mutation, crossover, constraint checking, and dimensional analysis over it (#471, #472, #464).

constraints entries must now match operator arity exactly: a tuple of length N for an N-argument operator, else ValueError: Operator '<op>' has arity N but constraint tuple has length M. Unary operators still default to -1, and arity 2 and above default to tuple([-1] * arity).

SymPy export keeps up (#999): Max(*args) and Min(*args) replace the old two-argument Piecewise form, and fma, muladd, and clamp gained mappings. That is what makes these operators usable outside Julia.

Seed the search with guesses

Give PySR any guess for the final expressions, and it mixes those guesses into the populations throughout the search (#999; backend #469, #500). When should_optimize_constants=True, constants in a guess are optimized before the candidate enters the population, so the structure can be useful even when its initial constants are inaccurate. fraction_replaced_guesses controls the fraction of each population drawn from guesses at the end of every cycle. Guesses also support custom value types (#1316).

from pysr import PySRRegressor
model = PySRRegressor(
binary_operators=["+", "*"],
unary_operators=["sin"],
guesses=["sin(x0 * 2.1 - 0.5)", "x0 * 3.0 + x2"],
fraction_replaced_guesses=0.01,
)
model.fit(X, y)

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [pysr](https://github.com/astroautomata/PySR) to permit the latest version.
- [Release notes](https://github.com/astroautomata/PySR/releases)
- [Changelog](https://github.com/astroautomata/PySR/blob/master/CHANGELOG.md)
- [Commits](astroautomata/PySR@v1.5.0...v2.0.0)

---
updated-dependencies:
- dependency-name: pysr
  dependency-version: 2.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Aug 31, 2026
@dependabot @github

dependabot Bot commented on behalf of github Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #65.

@dependabot dependabot Bot closed this Sep 7, 2026
@dependabot
dependabot Bot deleted the dependabot/pip/pysr-gte-1.5.0-and-lte-2.0.0 branch September 7, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants