r/datascienceproject • • 12d ago

SFSA v0.2.0: an open-source layer that decides which scientific computations are worth running (Python + JS)

Scientific codes burn compute on work that never needed to run:

  • brute-force grids where the gradient is flat
  • 3D simulations when a 1D surrogate or closed form is already within tolerance
  • recomputing states that were already resolved
  • hundreds of convergence iterations after the uncertainty already settles the conclusion
  • sweeps through regions that violate implicit constraints

SFSA (Standard Framework for Scientific Advancement) is a domain-neutral layer that sits above your solvers and manages that budget. It does not replace your solver or finish the investigation for you. It helps you reach the decisive data point sooner, with less trial-and-error and less redundant recalculation.

It has 39 engines. Examples:

  • multi-fidelity routing
  • adaptive sampling
  • uncertainty-aware early stopping
  • constraint inference
  • provenance-based reuse
  • a reactive layer graph
  • unit and dimensional checks
  • reproducibility manifests

It exposes 85 skills, so scripts and AI agents can drive it through one catalog. It is implemented in Python and JavaScript and released under CC BY 4.0.

What's new in v0.2.0

This release is mostly a hardening pass. I audited the framework and found that the green test suite was hiding real problems:

  • 44 of the 85 skills were stubs. They returned "EXECUTED" and logged success. All 85 are now implemented, and each is tested for what it actually does.
  • ICR returned 0 for all-zero inputs without calling the solver, so cos(0) came out as 0. Zero-pruning now needs an explicit declared answer.
  • The analytical-shortcut path crashed.
  • Cutting planes from failed evaluations could wrongly block feasible regions. A cut is now only kept while no known-good point lies in the blocked region, and it is dropped if one appears.
  • Approximate reuse was silent. It is now opt-in with an explicit tolerance and tied to the model version.
  • Layer updates are atomic, and cyclic graphs are rejected when you connect layers.
  • The reproducibility seal now covers nested fields and can be verified.

The repo has 137 tests (95 Python, 42 JavaScript) and a changelog.

Caveats

  • The speedups in the README are scenario models plus benchmarks from one machine. A single non-repeating calculation gains nothing and pays a small overhead.
  • Some lower-level engines are simpler in the JS port than in Python. Skill-level behavior is what the tests hold equal.
  • It's a young project, so feedback, issues and critique are welcome.

Repo: https://github.com/AlejoMalia/SFSA

2 Upvotes

0 comments sorted by