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

SMTorg / smt / 43877352042
93%

Build:
DEFAULT BRANCH: master
Ran 16 Nov 2026 02:06PM UTC
Jobs 1
Files 88
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

16 Nov 2026 01:36PM UTC coverage: 92.671% (+0.2%) from 92.451%
43877352042

push

github

web-flow
feat(jax): add universal JAX predictors and accelerated inference (#851)

## Summary

Adds unified `use_jax=True` accelerated inference (`predict_values`,
`predict_derivatives` via `jax.jvp` +
`jax.vmap`), pure-JAX differentiable predictors (`get_jax_predictor()`),
and an optional sparse JAX Conjugate
Gradient solver (`solver="jax-cg"`) across SMT surrogate models (**18
files changed**).

- **Supported models**: `KRG`, `KPLS`, `KPLSK`, `GEKPLS`, `MFK`
(`MFKPLS`, `MFKPLSK`), `RMTS` (`RMTB` / `RMTC`),
`RBF` (Gaussian), `IDW`, `LS`, and `QP` (`MGP` and `SGP` explicitly set
`supports["jax"] = False`).
- **Variance & autodiff support**:
- `KrgBased.get_jax_predictor(return_variance=True)` returns `(y, s2)`
(with `lower=True` for non-constant
`poly="linear"` / `"quadratic"` trends in both NumPy and JAX). `MFK` JAX
predictors return the mean only.
- Exact $C^2$ custom JVP rules (`@jax.custom_jvp`) for `matern32` and
`matern52` enable accurate second-order AD
at training points.
- **Unified input & scoped 64-bit safety**:
- Shared `_prepare_jax_inputs` normalizes `0D` (`nx == 1`), `1D`, and
`2D` inputs and validates rank/feature
count across `KRG`/`MFK`, `RMTS` (`predict_rmtb_jax` /
`predict_rmtc_jax`), `RBF`, `IDW`, `LS`, and `QP`.
- `_enable_jax_x64` scopes `jax_enable_x64` on internal `use_jax=True`
calls without mutating the caller's
global JAX configuration, while `get_jax_predictor()` respects the
active precision setting and falls back
cleanly when JAX is not installed.
- `RMTS` adds `jax_dtype="float64" | "float32"` and `solver="jax-cg"` /
`"jax_cg"` (`JaxCGSolver` with Jacobi
preconditioning).
- `__getstate__` clears JIT caches so models remain picklable after JAX
inference.

## Verification

- GitHub Actions CI: **8/8 checks passed** (`Tests` on
Linux/macOS/Windows, `Tests Minimal` without optional deps,
`Tests Coverage` + `ruff check` / `ruff format --check`).
- Cross-checked `KrgBased` analytic mean and variance derivatives
against `jax.vmap(jax.g... (continued)

365 of 378 new or added lines in 17 files covered. (96.56%)

10761 of 11612 relevant lines covered (92.67%)

0.93 hits per line

Uncovered Changes

Lines Coverage ∆ File
7
96.34
smt/surrogate_models/krg_based/krg_jax.py
3
98.5
-0.46% smt/surrogate_models/rmts.py
2
98.19
-0.67% smt/utils/test/test_misc_utils.py
1
92.5
1.43% smt/utils/checks.py
Jobs
ID Job ID Ran Files Coverage
1 Test - 43877352042.1 16 Nov 2026 02:06PM UTC 88
92.67
Source Files on build 43877352042
  • Tree
  • List 88
  • Changed 17
  • Source Changed 0
  • Coverage Changed 17
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • bafed6c7 on github
  • Prev Build on master (#43828266472)
  • Next Build on master (#43887284756)
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