Skip to main content

srbf: the symbolic-regression evaluation framework (engine, adapters, benchmarks, metrics) carved from flash-ansr.

Project description

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.

Project details


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.1.0.tar.gz (76.1 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.1.0-py3-none-any.whl (82.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for srbf-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e29a99ce1a34400d832439c4c319e28c757e1e3745cade1fdbbd0f99f7039cb6
MD5 7b3f0610c347206a1b98c3637413f6c7
BLAKE2b-256 31f02f2ebbdc0db36dcd739294fe0d16c55e8bd6d6237e3fb207253be8568e1a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: srbf-0.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a7f9c51581ddcd0166163b122c80d9a68efbc1df98be79a1390b933ccb8e3f79
MD5 411eee1980631d71e373112f9a7ba080
BLAKE2b-256 83e1709ada2d7b6804fbb0be519330e80ddb8db2f54300d58c30c6f3842328b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for srbf-0.1.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 Pingdom Monitoring Sentry Error logging StatusPage Status page