Skip to main content

srbf: Symbolic Regression Benchmark Framework

srbf evaluates symbolic-regression models on shared benchmarks with shared metrics. It is the evaluation framework carved out of flash-ansr: the evaluation engine, model adapters, benchmarks, and metrics. 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, skeleton_pool, brute_force) are reference examples, not a closed set. See the adapter contribution guide.

Status: 0.1, cleanly-carved eval. The engine seam (srbf.eval.core Protocols + srbf.eval.engine) is model-agnostic, but every built-in adapter imports flash-ansr and the adapter set is a registry edited by PR. A plugin register_adapter() entry-point and raw-dataset ((X, y) CSV/parquet) ingestion are planned follow-ons.

Install

pip install srbf                 # engine + 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. fetch a benchmark + build its skeleton pool   (see docs/benchmarks.md)
#    ...then run an evaluation:
srbf run -c configs/evaluation/scaling/v23.0-3M_val.yaml --limit 50 -v

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

from srbf import build_evaluation_run

plan = build_evaluation_run(config="configs/evaluation/scaling/v23.0-3M_val.yaml")
plan.engine.run(limit=plan.remaining, output_path=plan.output_path)

Documentation

Guide What it covers
Running evaluations the srbf run CLI, config anatomy (data_source / model_adapter / runner / experiments), outputs, resume
Benchmarks & datasets fetching FastSRB, building skeleton pools with flash_ansr import-data, custom sets
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.2.0.tar.gz (76.2 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.2.0-py3-none-any.whl (82.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for srbf-0.2.0.tar.gz
Algorithm Hash digest
SHA256 38c7c3e6b6907721c82e3076bc17a03891d0e17c290de0b28f85ea9616107860
MD5 00c74bba152c034f49a769291f6db24b
BLAKE2b-256 e1867a2ca2624d23e02d691a68bb8a9aa188b70f52258bb6cd1f2949a2bd137b

See more details on using hashes here.

Provenance

The following attestation bundles were made for srbf-0.2.0.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: srbf-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 82.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63f6dfd1687cf70941415b78a419b401baa0232d3ea97c4e8d23d12792e17507
MD5 265461025485c9717c44acd415c5560b
BLAKE2b-256 249a86b851510b778997837ff80f53a6a3b8f050789baf51457f4c3f08cfa545

See more details on using hashes here.

Provenance

The following attestation bundles were made for srbf-0.2.0-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