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.4.0.tar.gz (71.6 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.4.0-py3-none-any.whl (77.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for srbf-0.4.0.tar.gz
Algorithm Hash digest
SHA256 d04b4944a4bb1c841ed9c21105a5f66d16fc9bed419c512a2ac26f28cf3b7fdc
MD5 5a6bca5ef14d55a15b08d34847b2483a
BLAKE2b-256 a53016f4b582806f626c1e00a48a984e0a1d0db872e2dd7f99c8fbe9c809f63d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: srbf-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 77.1 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22f98eb952fb5e307505bdcc167222311f9c99bcacc307be90bffc01d0bb749a
MD5 c6dee10be1256fad31071d5690e8c6aa
BLAKE2b-256 5ac875bc0bd5330414cadda6d45c7987aee2da083c8706a0c6a5c8e597d5b91d

See more details on using hashes here.

Provenance

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