Skip to main content

srbf: Symbolic Regression Benchmark Framework

srbf evaluates symbolic-regression models on shared benchmarks with shared metrics. It is the benchmark framework carved out of flash-ansr: the Benchmark driver, model adapters, and metrics, over symbolic-data catalogs. It depends one-way on flash-ansr (srbf imports flash-ansr; flash-ansr never imports srbf).

Built for contributions. Developers of SR methods add their model by opening a PR with an adapter (two methods) plus install instructions. The built-in adapters (flash_ansr, pysr, nesymres, e2e, lample_charton, brute_force) are reference examples, not a closed set. See the adapter contribution guide.

Status: 0.5, data-layer redesign. The benchmark seam (srbf.core Protocols + the Benchmark driver) is model-agnostic, the data source is always a symbolic-data catalog, and adapters are a thin mapper over each model (flash-ansr via FlashANSR.infer()). Inline !sweep config cross-products and multi-draw bootstrap reporting (bootstrap_report / draw_distribution) ship in this release.

Install

pip install srbf                 # benchmark driver + metrics + the pip-installable adapters (flash-ansr, PySR)
pip install "srbf[baselines]"    # + pip baseline deps (sympy, pysr, omegaconf)

srbf pulls in flash-ansr and simplipy automatically. The unpackaged research baselines (NeSymReS, E2E) are provisioned out-of-band; see docs/models.md.

Quickstart

# 1. point srbf at a tree holding configs/, data/, and models/ (your srbf checkout works)
export FLASH_ANSR_ROOT=$(pwd)

# 2. get a model to evaluate (flash-ansr's CLI ships with srbf)
flash_ansr install psaegert/flash-ansr-v23.0-3M

# 3. run an evaluation. The config names a symbolic-data catalog (`fastsrb` / `v23-val`); it is
#    fetched from Hugging Face on first use and cached, so there is no local data-build step.
#    The config is a sweep over candidate counts; --sweep-filter picks one rung for a smoke test.
srbf run -c configs/evaluation/scaling/v23.0-3M_fastsrb.yaml --sweep-filter ladder=32 --limit 50 -v

Outputs land under results/evaluation/.../*.pkl, one row per evaluated problem with flat metric columns. Run programmatically instead:

from srbf import Benchmark

# A config with inline !sweep / experiments expands to several runs; expand and run each one.
for benchmark in Benchmark.runs_from_config("configs/evaluation/scaling/v23.0-3M_fastsrb.yaml"):
    benchmark.run()  # resume-aware; a no-op if that run's configured target is already reached

# For a single, fully-resolved run (no !sweep / experiments), use from_config directly:
# Benchmark.from_config(config_dict).run()

Documentation

Guide What it covers
Running evaluations the srbf run CLI, config anatomy (data_source / model_adapter / runner / experiments / !sweep), outputs, resume, reporting
Benchmarks & datasets the data_source catalog block, the shipped catalogs (v23-val, fastsrb, lample-charton-v23), custom catalogs
Models & provisioning installing/patching the built-in models; the model_adapter block per type
Adding your model the adapter protocol + registry, and the PR flow to contribute a new SR method

Development

pip install -e ".[dev]"
pre-commit run --all-files
pytest tests

License

MIT (see LICENSE). Third-party attributions in THIRD_PARTY_LICENSES.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

srbf-0.5.2.tar.gz (59.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

srbf-0.5.2-py3-none-any.whl (67.3 kB view details)

Uploaded Python 3

File details

Details for the file srbf-0.5.2.tar.gz.

File metadata

  • Download URL: srbf-0.5.2.tar.gz
  • Upload date:
  • Size: 59.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for srbf-0.5.2.tar.gz
Algorithm Hash digest
SHA256 c4711e53d260f0717c6b18ddbb5bcedeef22772647b6928b2da3a26d2c81de95
MD5 5c915cffc7e7e2e0cb564eb34a07b0c3
BLAKE2b-256 0a47119722741bb6712336a5111c7db8713be0f5d63625c8215b6646ad8cf4d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for srbf-0.5.2.tar.gz:

Publisher: publish.yaml on psaegert/srbf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file srbf-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: srbf-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 67.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for srbf-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1e696b15fb6ca2a3bccf4973ae8123b6bc3d40840486be2deae6cbb6342765f4
MD5 dba2e0ea5d1450fba2fa189ccc8b02c0
BLAKE2b-256 5aaff43b2fc17159b7a45a6788d5aca92d59462afad85d1d4a58f60c12073f22

See more details on using hashes here.

Provenance

The following attestation bundles were made for srbf-0.5.2-py3-none-any.whl:

Publisher: publish.yaml on psaegert/srbf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page