Skip to main content

nirs4all-cluster

nirs4all-cluster

Status: beta · trusted-LAN. A small distributed job queue for nirs4all.run(), built for a trusted local network — not the open internet or untrusted multi-tenant use. API v2 uses private project tokens and isolated project stores. Consumers grant execution on trusted providers; there is no science sandbox. See SECURITY.md, PROTOTYPE_DESIGN.md (the design source of truth) and PROTOTYPE_TO_PRODUCTION.md. The broader question of a native cluster vs. an opt-in Dask backend in nirs4all remains open.

📖 Docs: https://nirs4all-cluster.readthedocs.io · 🖥️ Dashboard: http://HOST:8765/ui

Distributed execution ofnirs4allpipelines (client / server / workers): a coordinator receives jobs and dispatches the work to workers that poll the server. The prototype does not modify any other library in the ecosystem:nirs4allis only imported by the runner subprocess, and the server/client works without it.

What it does

  • Submission of anirs4all.run()job via Python SDK or CLI. - FastAPI server + SQLite file + local object store addressed by SHA-256. - Workers polling (long-polling HTTP + heartbeat), with a task sandbox per folder. - Atomic job (Level 0) andpipelines × datasetsdecomposition (Level 1) with aggregation/ranking. - Download artifacts: JSON summary, logs, best.n4amodel. - Recovery after worker crash (lease + retry), cooperative cancellation, idempotence. - Routing by capabilities: labels, memory, package versions (PEP 440), GPU/CUDA (auto-detected,requirements.min_gpu_countorcuda=truelabel). Anirs4all.runjob requiresnirs4allby default. - Dashboard shell (live feed deferred for API v2) at /ui (jobs, workers, events; cancel) over a global WebSocket stream. - Version compatibility tracking: client/server/worker advertise their nirs4all-cluster + protocol version; incompatible protocol majors are rejected, compatible drift is logged/traced. Pipeline content fingerprints recorded end-to-end. - Richer job listing/filtering (n4cluster jobs --status … --name …, GET /v1/stats) and structured logging (--log-level, --log-file).

Installation

# Worker environment = an existing nirs4all environment + this package:
uv pip install -e .            # serveur + client + transport worker
# (workers provide nirs4all themselves; it is not a hard dependency)

Python ≥ 3.11. The server and client only need FastAPI/uvicorn/httpx/pydantic; only the worker needs a provisionednirs4allenvironment.

Local project services

See quickstart, CLI and security boundary. API v2 fails closed. Explicitly initialize a new empty state directory, provision separate project-scoped consumer and provider tokens, and restart the server after credential changes. Credentials are persisted hash-only through the independent stdlib nirs4all-access package. No server secret in argv, environment or URLs. Clients use a private token file or NIRS4ALL_PROJECT_TOKEN. Unmarked old state is refused without opening SQLite.

Workers need allowed shared input roots and one OS identity per project provider. Requested export uses real owner APIs; missing/unsupported exports fail explicitly. The supported profile is nirs4all-python-n4a-1.0; canonical Core T3/T4 is pending. The unchanged dashboard live feed awaits a joint frontend migration.

Architecture

submitter (SDK/CLI/Studio) ──REST + WS──► serveur (FastAPI + SQLite + object store + scheduler + events)
                                              ▲
                          long-polling HTTP + heartbeat
                                              │
                                          workers ──► subprocess runner ──► nirs4all.run(workspace=task_ws)
  • nirs4all_cluster/server/ —app.py(API),db.py(SQLite file, atomic leasing, reaper),scheduler.py(state machines + matching),artifacts.py(SHA-256 store),events.py(broker). - nirs4all_cluster/worker/ —agent.py(polling loop),materialize.py(resolution of references → local paths),executor.py(subprocess + capture + undo). - nirs4all_cluster/runners/nirs4all_run.py — only module that importsnirs4all. - client.py (SDK), cli.py (n4cluster), schemas.py (Pydantic contract).

Tests and validation

pytest -q                                   # unit/API tests without nirs4all + skipped integration if unavailable
pytest -q tests/test_release_smoke.py       # wheel + installed CLI/server/worker smoke, no nirs4all
python scripts/validation.py                # end-to-end harness on nirs4all-data (8/8)

Results measured onnirs4all-data(see WORKLOG.md): atomic job →.n4a, 2 workers in parallel, kill worker → retry, cancellation not restarted,pipeline × datasetaggregation, and exact metric parity vs localnirs4all.run()(diff = 0.0) — beyond the criterion go/no-go ≤ 1e-10.

Go/no-go criteria to upgrade to product

The go remains conditional on all of these conditions:

  1. ≥ 2 labs/partners explicitly request distributed execution. (not measurable here)
  2. Speedup ≥ 3× on a real workload (grid search AOM / HPO on ≥ 32 datasets). (to be measured)
  3. Metric-identical results (≤ 1e-10) with single-machine. → reached: diff = 0.0 on the atomic job. 4. Data + security + recovery model written before the code. → done inPROTOTYPE_DESIGN.md. 5. Framing topics covered from the start (mTLS, secrets, third-party sandboxing, IP/GDPR datasets, heavy TF/Torch/JAX environments, transfer costs, idempotence/resumption, quotas/fairness, heterogeneous scheduling). → listed inPROTOTYPE_TO_PRODUCTION.md.

These criteria gate a full production commitment (mTLS, sandboxing, Postgres, network object storage — see PROTOTYPE_TO_PRODUCTION.md). Until they are met, the ecosystem's default option remains an opt-in Dask backend in nirs4all; this repository is published as a usable trusted-LAN beta and an auditable reference for the design, not as a production roadmap commitment.

Non-objectifs (rappel)

No modification of other libs, no open multi-tenant, no sandbox for Python code arbitrary, no K8s/Ray/Dask type scheduler, no concurrent writing in a workspacenirs4allshared, no distribution of folds. SeePROTOTYPE_DESIGN.md§ Non-objectives.

References

PROTOTYPE_DESIGN.md,PROTOTYPE_TO_PRODUCTION.md,WORKLOG.md, andnirs4all-ecosystem/NIRS4ALL-ECOSYSTEM_VISION.md(annex Perspective: distributed execution, risk R13).

License

nirs4all-cluster is dual-licensed open-source — CeCILL-2.1 OR AGPL-3.0-or-later (your choice) — with an optional commercial license for closed-source / SaaS use. For any commercial use, contact nirs4all-admin@cirad.fr. See LICENSING.md, the texts under LICENSES/, and THIRD_PARTY_NOTICES.md.

Metadata

Release files for nirs4all-cluster 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nirs4all-cluster 0.1.6
File Size Uploaded Provenance Actions
nirs4all_cluster-0.1.6.tar.gz 276.8 kB With provenance Details for nirs4all_cluster-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nirs4all-cluster 0.1.6
File Interpreter ABI Platform Actions
nirs4all_cluster-0.1.6-py3-none-any.whl Python 3 none any Details for nirs4all_cluster-0.1.6-py3-none-any.whl

Total release size: 408.2 kB

Release files / nirs4all_cluster-0.1.6.tar.gz

Download URL nirs4all_cluster-0.1.6.tar.gz
Size 276.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ee975ab26733c6332e5d87919caa59c4411288eb87f64592bf62f726713b42a4
BLAKE2b-256 checksum
How to use checksums
d0d86afbce6a0e0573667ec3057b65373b48b3161e03a931caa2df5c54b8265e
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 Nov 9, 2026.

Transparency log

Release files / nirs4all_cluster-0.1.6-py3-none-any.whl

Download URL nirs4all_cluster-0.1.6-py3-none-any.whl
Size 131.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6e69bdaa89a2d532810e12cb5dad46001e5970fdbada79f5abb44d770d87b58
BLAKE2b-256 checksum
How to use checksums
8b4b4e92cc26e465873e9de9ecb0a67e4ed953b6340cfc27b9f90d35adff60d6
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 Nov 9, 2026.

Transparency log

Security for nirs4all-cluster 0.1.6

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nirs4all_cluster-0.1.6.tar.gz

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 Nov 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page