Python Binding
Distribution name: nirs4all-core
Import name: nirs4all_core
This binding intentionally avoids the nirs4all import name so it can be
installed next to the full Python nirs4all package during parity checks.
The canonical source repository is nirs4all-core; only the Python
distribution carries the -core suffix because the production nirs4all
Python package already owns the bare name.
An additive import facade is available for governed topology work:
n4amirrors the fullnirs4all_coreaggregate surface.
Native archive bridge
nirs4all_core.read_portable_predictor_package_v2(path) invokes the embedded
Rust Archive V2 reader and returns the exact validated DAG-ML Package V2 bytes.
It does not parse ZIP members in Python, deserialize the package, or execute a
prediction. Pass the returned bytes to DAG-ML's typed package/replay surface;
the aggregate remains only the container and integrity boundary.
replay_methods_archive_v2(...) and replay_methods_archive_v3(...) provide
the callback-free execution path. Rust validates the complete archive before
DAG-ML parses the signed request and numeric Methods inputs or opens the
invocation-local N4MM runtime. These functions do not accept Python callbacks,
estimator handles, pickle, or joblib sidecars; unsupported host controllers are
refused rather than hydrated implicitly.
For calibrated scalar Package V2 archives,
replay_methods_archive_v2_conformal_presentation_v1(...) returns the exact
self-validating presentation built by DAG-ML from the native replay. The
Python layer only transports strict JSON; it does not calculate quantiles,
interval endpoints, fingerprints, or sample joins.
For named multi-target outputs,
replay_methods_archive_v2_conformal_presentation_v2(...) returns the
additive, archive-bound ConformalPresentationV2. It preserves predictor,
archive, calibration and presentation fingerprints and applies the same
no-recalculation rule. V1 remains the scalar compatibility surface.
Archive replay accepts raw PLS N4MM format 1 and the exact embedded format 2
SNV(ddof=0) -> Savitzky-Golay(mode=interp) -> PLS profile. Format 2 requires
its typed ABI 2.5 descriptor and never falls back to Python preprocessing.
Training an IO DatasetPackage into Archive V2 is currently a Rust aggregate
surface, not a Python API.
Portable Execution
nirs4all_core.run_portable_pipeline(source, dataset) executes the shared
portable JSON/YAML subset through the nirs4all-methods Python bindings:
KennardStoneSplitterStandardNormalVariate/SNVSavitzkyGolaysklearn.cross_decomposition.PLSRegression_range_sweeps overn_components
Savitzky-Golay defaults to mode="interp" for full Python nirs4all parity and
preserves explicit methods-backed modes (mirror, constant, nearest,
wrap, interp) plus cval.
The aggregate does not implement numerical kernels. Install the optional
methods extra, or make n4m and pls4all importable, before calling it:
python -m pip install "nirs4all-core[methods]"
The strict local parity gate compares all shared fixtures against the full
Python nirs4all oracle and reports max prediction/RMSE deltas on failure:
PYTHONPATH=bindings/python/src:/path/to/nirs4all-methods/bindings/python/src \
N4M_LIB_PATH=/path/to/libn4m.so \
NIRS4ALL_CORE_REQUIRE_METHODS_PARITY=1 \
python -m unittest bindings/python/tests/test_execution_parity.py -v
Metadata
Release files for nirs4all-core 0.3.25
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nirs4all_core-0.3.25.tar.gz | 224.9 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nirs4all_core-0.3.25-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details |
| nirs4all_core-0.3.25-cp311-abi3-manylinux_2_28_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.28+ x86-64 | Details |
| nirs4all_core-0.3.25-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 9.1 MB
Release files / nirs4all_core-0.3.25.tar.gz
| Download URL | nirs4all_core-0.3.25.tar.gz |
|---|---|
| Size | 224.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ccb1409049b7e2c6444c00fff3852f7c4afa87266886d2f63b4acf8e7bb52f8
|
|
BLAKE2b-256 checksum How to use checksums |
b977e611e754b531c62b324b1b62b5baa0e35709e0d3b469f9001ba70cdae04a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / nirs4all_core-0.3.25-cp311-abi3-win_amd64.whl
| Download URL | nirs4all_core-0.3.25-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e3398c551622c8032c1792552144ca51b951eb72601735072b0f7d65c980b31e
|
|
BLAKE2b-256 checksum How to use checksums |
f8907219b71eb885e6daaaf2fba52e933f065cd988d06d3f9ff782f1e4794b6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / nirs4all_core-0.3.25-cp311-abi3-manylinux_2_28_x86_64.whl
| Download URL | nirs4all_core-0.3.25-cp311-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
7a2d8432c1fee3d7012abbc5233bbf5ed35518936551f00caeb1b7c12bb3ef61
|
|
BLAKE2b-256 checksum How to use checksums |
da1c5f19732416334e824fa2cd32bc4accda1214be5d914b1f9181a5b5bf7857
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / nirs4all_core-0.3.25-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | nirs4all_core-0.3.25-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4fc588dc1f1df013268f53c6918efa2cdc0339020c0bdce992ad28bbf5d61845
|
|
BLAKE2b-256 checksum How to use checksums |
32e004cf5c12b3ae9d08c1bac5d8befc54cbc804b4f6f52118671c0987d2815a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency log