denpex-sdk
Zero-third-party Python helpers for SDC detection (per-layer weight/gradient norms, NaN/Inf checks, optimizer state validation) and asynchronous checkpoint validation (manifest integrity + content checksums) for S3/Lustre.
Cloud diagnosis client
from denpex_sdk import DenpexClient
client = DenpexClient(api_key="dpx_...")
result = client.diagnose(
open("training.log").read(),
jobName="llama3-405b-pretrain",
telemetry={"jobId": "slurm-1842"},
)
print(result["meta"]["failureType"], result["meta"].get("confidence"))
print(result["fix"]["summary"])
print(result["fix"]["action"])
client.feedback(result["diagnosisId"], "worked")
The client reads DENPEX_API_KEY when api_key is omitted and calls the live
/api/diagnose contract. Its default 320-second timeout covers the API's
290-second deep-diagnosis window. Optional arguments such as telemetry,
codeContext, topologyMap, runtimeHours, and gpuRate pass through.
SDC detection
from denpex_sdk import SdcHook, install_sdc_hooks
hook = install_sdc_hooks(model, SdcHook(max_weight_norm=1e4, max_grad_norm=1e4))
weight_report = hook.inspect()
grad_report = hook.inspect_gradients()
opt_report = hook.inspect_optimizer(optimizer)
Checkpoint validation
from denpex_sdk import build_manifest, manifest_to_json, manifest_from_json, validate_checkpoint
manifest = build_manifest(["/checkpoints/step-1000/"], metadata={"job_id": "..."})
with open("/checkpoints/step-1000/manifest.json", "w") as handle:
handle.write(manifest_to_json(manifest))
with open("/checkpoints/step-1000/manifest.json") as handle:
expected = manifest_from_json(handle.read())
result = validate_checkpoint(["/checkpoints/step-1000/"], expected_manifest=expected)
assert result.valid
Metadata
Release files for denpex-sdk 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| denpex_sdk-0.2.2.tar.gz | 31.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| denpex_sdk-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.0 kB
Release files / denpex_sdk-0.2.2.tar.gz
| Download URL | denpex_sdk-0.2.2.tar.gz |
|---|---|
| Size | 31.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7deaa5fd2b5712234b29907060e7612b4ccb2c1bbee9f130b80db1b2a8979af9
|
|
BLAKE2b-256 checksum How to use checksums |
75b1da591c5488109e393e83a7152450fae0fd251742708d5e50982e7aa0eac3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Release files / denpex_sdk-0.2.2-py3-none-any.whl
| Download URL | denpex_sdk-0.2.2-py3-none-any.whl |
|---|---|
| Size | 22.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54215ca1548aa755c755cb9c572d440b0a9b4abf411fb3416cf1a0d5c6124dce
|
|
BLAKE2b-256 checksum How to use checksums |
32a5dc452e5622809158dcb4dfcad3c00d67de3f0679f26f62a6cdf04ee76f04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Security for denpex-sdk 0.2.2
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.