Skip to main content

Sturnyx workload library

Projects choose whether to use this library and install their own dependencies. The platform never adds it to an image automatically. Once released, install a chosen version with pip install sturnyx==VERSION for monitoring, or pip install 'sturnyx[fl]==VERSION' for federated learning, in the project Dockerfile. For development, run uv build here and explicitly COPY/install the resulting wheel in an example image. No package has been published by this repository.

Clusters inspect the SDK version installed in built workload images before accepting preparation, including the server image before job export. Pin a version supported by the selected cluster; updating the desktop does not replace the SDK inside a saved image. Images without the optional SDK remain valid. See SDK compatibility for configuration and checks.

Monitoring

sturnyx.monitor uses only the Python standard library. It works in solo and collaborative and test workload containers without importing NVFlare or a training framework.

from sturnyx import monitor

monitor.metric("dataset.rows", 2500)  # local by default
monitor.metric("loss", 0.18, step=4, visibility="shared")
monitor.progress("preprocessing", 40, 100, visibility="shared")
monitor.log("Preprocessing complete", visibility="shared")

metric(name, value, *, step=None, unit=None, visibility="local") accepts finite scalars. progress(name, current, total, *, visibility="local") requires 0 <= current <= total and a positive total. log(message, *, level="info", name="log", visibility="local") supports debug, info, warning, and error. Names are limited to 128 UTF-8 bytes, units to 32, and messages to 4096. Invalid arguments raise ValueError; reporting returns False if its local destination is unavailable, so missing monitoring does not terminate a workload.

The agent supplies STURNYX_MONITOR_DIR, a narrowly scoped writable mount. Each process opens a dedicated append-only descriptor there; reports never mix with stdout/stderr, and no account credentials or additional network connection enter the workload. The library handles concurrent threads and processes. Do not mount agent state or create platform credentials in the image.

Local reports never upload. In collaborative deployments, only reports explicitly marked shared are forwarded by the agent. Shared reports retain worker identity; they are not automatically aggregated. Solo and test reports always stay local, even when the caller specifies shared visibility. Raw stdout/stderr always stay local. These visibility rules apply to metrics, progress, and diagnostic messages alike.

Open Monitor run under Solo runs, or Monitor deployment in a project's Execution & monitoring view. Select a report and workers to follow, pause live updates, or load earlier history. Viewing another worker's shared reports requires Monitor deployments permission; participants otherwise see their own. Developers can monitor from an unpaired machine through the platform. Local container output is available through the agent on the computer executing that workload.

Shared history is retained for 30 days by default (MONITORING_RETENTION_DAYS on the API). Local reports remain in run artifacts; the agent journal is capped at 64 MiB and 256 named report series per workload. The view keeps up to 2000 points in memory. Monitoring reports never change container or deployment status.

Runtime environment

sturnyx.runtime uses only the standard library. The platform identifies the environment without changing application settings:

from sturnyx import runtime

class Dataset:
    def __len__(self):
        return min(10, len(self.rows)) if runtime.is_test() else len(self.rows)

print(runtime.environment())

environment() returns test in developer test deployments, production in solo/collaborative deployments, or unmanaged outside an injected environment. is_test() is a convenience predicate. Invalid injected values raise ValueError. The same query is available in project server code. Non-Python programs can read STURNYX_ENVIRONMENT directly; Python containers can also run:

python -m sturnyx.runtime

Select a saved snapshot and Test deployment in the app to run real federation with simulated participants locally. Tests preserve project workflow settings, normal container startup and dependency choices. No dataset, batch or round reductions are supplied by Sturnyx. Results and reports stay local, and passing tests is not required for publication/start. Use Run solo for an ordinary single-container project.

Federated learning

Install the fl extra. The existing model, task, and parameter exchange API now lives under sturnyx.fl, with framework helpers under sturnyx.fl.helpers. Migrate import sturnyx as fl to from sturnyx import fl.

The image starts its own program using its normal ENTRYPOINT/CMD:

from sturnyx import fl

fl.init()
try:
    while fl.is_running():
        model = fl.receive()
        # Train/evaluate with model.params and send an fl.FLModel result.
        fl.send(model)
finally:
    fl.shutdown()

The bundled agent supplies a private deployment context and runs a separate NVFlare sidecar. init() attaches to that runtime; it does not launch training, create a deployment, or require the user to enter addresses or credentials. The same interface works for app-managed test deployments. Calling it outside a managed container fails with an explanation instead of creating a hidden runtime.

Framework dependencies belong in project images. The familiar NVFlare model, task inspection, parameter exchange, and FedProx/SCAFFOLD helpers are retained. Supported workflows follow the platform's pinned NVFlare 2.9.0 execution contract. Host orchestration, pairing, Docker, and private server code are excluded from this wheel. Solo containers can use monitoring without any federated runtime.

Metadata

Release files for sturnyx 0.1.0

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

Source distribution (sdist)

Source distribution for sturnyx 0.1.0
File Size Uploaded Provenance Actions
sturnyx-0.1.0.tar.gz 6.7 kB Without provenance Details for sturnyx-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sturnyx 0.1.0
File Interpreter ABI Platform Actions
sturnyx-0.1.0-py3-none-any.whl Python 3 none any Details for sturnyx-0.1.0-py3-none-any.whl

Total release size: 15.1 kB

Release files / sturnyx-0.1.0.tar.gz

Download URL sturnyx-0.1.0.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
45a8aa777824ebf4968e0bb671136eeaef0c4263819cf85acb6d3c356a2bc080
BLAKE2b-256 checksum
How to use checksums
bcf02b2972056f30a53ca575b83388cdfbf0ca9caa815f3f5a899bfac36b7da7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / sturnyx-0.1.0-py3-none-any.whl

Download URL sturnyx-0.1.0-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5334ccc4a38c76241e427061d14b0e5f3b48d44302a9ccaf1dbb39ccca0e8dd2
BLAKE2b-256 checksum
How to use checksums
96c31d4ac9e0ad995eed2cb1cecf792e296afaf817cc448927955901c730ff08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for sturnyx 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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