How astroautomata/pysr works
PySR is a Python-facing symbolic-regression product backed by the Julia SymbolicRegression search engine. The main workflow configures a regressor, fits it to feature/target data, runs the search, retains and selects candidate equations, and exposes predictions and export formats. The graph includes documented auxiliary capabilities for denoising and feature selection. Source excerpts are partial, so links to those auxiliary subsystems and some persistence details are not asserted where their wiring was not shown.
Main entry points: sr.py Regressor · __init__.py Public API · julia_import.py Julia Bootstrap · julia_helpers.py Julia Helpers
Components 20
Python Interface
- Regressor
pysr/sr.py - Public API
pysr/__init__.py
Search Configuration
- Expression Specs
pysr/expression_specs.py - Type Specs
pysr/type_specs.py - Mutation Config
pysr/mutations.py
Julia Search
- Julia Bootstrap
pysr/julia_import.py - Julia Helpers
pysr/julia_helpers.py
Results and Exports
- Equation Results
pysr/sr.py - Search Checkpoint
pysr/sr.py - NumPy Export
pysr/export_numpy.py - SymPy Export
pysr/export_sympy.py - JAX Export
pysr/export_jax.py - PyTorch Export
pysr/export_torch.py - LaTeX Export
pysr/export_latex.py
Model Extensions
- Denoising
pysr/denoising.py - Feature Selection
pysr/feature_selection.py - Plugins
pysr/plugins.py
Other components
- Python User
- Training Data
- SymbolicRegression.jl
Connections 19
- Python User → Public API: uses
- Public API → Regressor: exposes
- Training Data → Regressor: fits
- Regressor → Expression Specs: configures
- Regressor → Type Specs: validates
- Regressor → Mutation Config: converts
- Regressor → Julia Bootstrap: initializes
- Regressor → Julia Helpers: converts data
- Julia Helpers → SymbolicRegression.jl: bridges values
- Julia Bootstrap → SymbolicRegression.jl: loads
- Regressor → SymbolicRegression.jl: runs search
- SymbolicRegression.jl → Regressor: returns search state
- Regressor → Equation Results: selects equations
- Regressor → Search Checkpoint: saves state
- Regressor → NumPy Export: builds exports
- Regressor → SymPy Export: builds exports
- Regressor → JAX Export: builds exports
- Regressor → PyTorch Export: builds exports
- Regressor → LaTeX Export: formats equations