• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SMTorg / smt / 43585128099
93%

Build:
DEFAULT BRANCH: master
Ran 14 Nov 2026 11:17AM UTC
Jobs 1
Files 87
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Nov 2026 10:24AM UTC coverage: 92.389% (-0.5%) from 92.892%
43585128099

push

github

web-flow
Pure-Python RBF and IDW (remove remaining C++/Cython extensions) (#857)

## Summary

Reimplements the RBF and IDW surrogate models in pure Python, following
the approach of #848 for RMTS. Together with #848, this removes the last
C++/Cython extensions, so installing SMT no longer requires a C/C++
compiler.

- Removes `smt/src/rbf/`, `smt/src/idw/`, and the `rbfclib` / `idwclib`
extensions from `setup.py`.
- Adds `smt/surrogate_models/rbf_idw_backend.py`:
- **NumPy engine (default):** vectorized, using
`scipy.spatial.distance.cdist` for pairwise distances. No new
dependencies.
- **Numba engine (optional):** parallel, cached kernels, enabled with
`USE_NUMBA_JIT=1` as in #848. Falls back to NumPy if Numba is not
installed.
- The public API is unchanged: same options, outputs, and derivative
shapes (`predict_values`, `predict_derivatives`,
`predict_output_derivatives`), and no new options. Models pickled with
the old extensions still load.

## Verification

- `test_cpp_regression_rbf` and `test_cpp_regression_idw` compare
against reference outputs captured from the legacy C++ implementation on
master (dde28bd2), hard-coded inline.
- Coverage: RBF in 1D/2D/5D and IDW in 1D/2D/4D, across several `d0`,
`poly_degree`, `reg`, and `p` settings, with multiple outputs. Each case
checks values, derivatives with respect to every input, and output
derivatives, and includes an evaluation point that coincides with a
training point.
- Tolerance: `rtol=atol=1e-10`. The observed max deviation from C++ is 0
for RBF and 1.2e-14 for IDW.
- `test_rbf_idw_backend.py` covers:
  - agreement between the NumPy and Numba engines
  - finite-difference derivative checks
  - IDW exact-hit and duplicate-point handling
  - a pickle round trip
  - the environment-variable switch and the fallback
- `smt/surrogate_models/tests` and `smt/tests`: 250 passed, 23 skipped.

## Performance

1,500 training points, 5D, 20,000 evaluation points, Apple Silicon:

| | C++ | NumPy (default) | Numba |
... (continued)

144 of 215 new or added lines in 5 files covered. (66.98%)

2 existing lines in 2 files now uncovered.

10270 of 11116 relevant lines covered (92.39%)

0.92 hits per line

Uncovered Changes

Lines Coverage ∆ File
71
60.34
smt/surrogate_models/rbf_idw_backend.py

Coverage Regressions

Lines Coverage ∆ File
1
98.15
-0.48% smt/surrogate_models/idw.py
1
99.03
-0.12% smt/surrogate_models/rbf.py
Jobs
ID Job ID Ran Files Coverage
1 Test - 43585128099.1 14 Nov 2026 11:18AM UTC 87
92.39
Source Files on build 43585128099
  • Tree
  • List 87
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 7e838ed3 on github
  • Prev Build on master (#43574273032)
  • Next Build on master (#43585691676)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc