nemo_automodel.components.training.rng
nemo_automodel.components.training.rng
Module Contents
Classes
Functions
API
Legacy RNG state kept for trusted pickle-based checkpoint restores.
Context manager for reproducible RNG states across random, NumPy, and PyTorch.
Save current RNG states.
Restore RNG states on context exit.
RNG manager for reproducible RNG states across random, NumPy, and PyTorch.
Restore RNG states from a saved state.
Parameters:
RNG states as returned by state_dict().
Get current RNG states.
Returns: _RNGState
RNG states for random, NumPy, and PyTorch.
Bases: typing.TypedDict
Weights-only-safe snapshot of Python, NumPy, Torch, and CUDA RNG states.
Get current RNG states.
Returns: _RNGState
RNG states represented only by primitives and tensors so the state can
Restore RNG states from a saved state.
Parameters:
Current weights-only-safe RNG state or legacy RNG state loaded from a trusted pickle-based checkpoint.
Initialize RNGs for Python, NumPy, and PyTorch (incl. CUDA) with a seed.
Parameters:
Base seed value.
Adjust seed by process rank if True.