nemo_automodel.components.training.rng
nemo_automodel.components.training.rng
Compatibility imports for shared training and data-construction RNG utilities.
Keep this module path available for existing callers and legacy RNGState pickles.
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.
Initialize RNGs for Python, NumPy, and PyTorch (incl. CUDA) with a seed.
Parameters:
Base seed value.
Adjust seed by process rank if True.