Install & Compatibility
Where this runs
tested against v0.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.10
✕ build_error
✓ 77.93s
py 3.11
✕ build_error
✓ 76.5s
py 3.12
✕ build_error
✓ 57.68s
py 3.13
✕ build_error
✕ build_error
py 3.9
✕ build_error
✕ build_error
4881MB installed
● package 4881MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
nvidia_resiliency_ext
✓ import nvidia_resiliency_ext
✗ import nvre
This quickstart demonstrates the basic initialization of the resiliency manager, registering a restart callback, and using checkpointing to save and load training state. The example simulates training steps and checkpoint saves, showing how to resume from a previously saved state.
import nvre
import os
def my_restart_callback(restart_args):
print(f"[NVRE] Restart event received: {restart_args}")
# 1. Initialize the resiliency manager
# This must be called early in your application's lifecycle.
# In a real scenario, this might be within a distributed setup like Horovod or PyTorch DDP.
# For simple testing, it can run standalone.
print("[NVRE] Initializing resiliency manager...")
nvre.init_resiliency_manager()
# 2. Register a callback for restart events (optional, but good practice)
nvre.register_restart_callback(my_restart_callback)
# 3. Example: Checkpointing
checkpoint_id = "my_training_state"
if nvre.has_checkpoint(checkpoint_id):
print(f"[NVRE] Loading checkpoint '{checkpoint_id}'...")
state = nvre.load_checkpoint(checkpoint_id)
current_step = state.get("step", 0)
print(f"[NVRE] Resuming from step {current_step}")
else:
print(f"[NVRE] No checkpoint found for '{checkpoint_id}'. Starting new training.")
current_step = 0
# Simulate some training steps
for i in range(current_step, current_step + 3):
print(f"[NVRE] Training step {i}")
# Simulate a checkpoint save every step for demonstration
if i % 1 == 0:
state_to_save = {"step": i + 1, "model_config": {"lr": 0.001}}
print(f"[NVRE] Saving checkpoint '{checkpoint_id}' at step {i}...")
nvre.save_checkpoint(checkpoint_id, state_to_save)
print("[NVRE] Training finished.")
# Cleanup (optional in many cases, but good for explicit shutdown)
nvre.shutdown_resiliency_manager()
Upgrade
Version history
0.6.0latest on PyPI · released May 14, 2026
Audit
Dependencies
numpyrequiredRequired for core functionalities.
mpi4pyoptionalRequired for MPI-based resiliency features and distributed training contexts.
protobufoptionalOften used for data serialization, especially in distributed contexts.
boto3optionalRequired for S3 cloud checkpointing support.
google-cloud-storageoptionalRequired for Google Cloud Storage checkpointing support.