sage.core.seed

Filename : seed.py Description : Short description of the file

Created on 2026-01-19 23:34:03

__author__ = Narenraju Nagarajan __copyright__ = Copyright 2026, ProjectName __license__ = MIT Licence __version__ = 0.0.1 __maintainer__ = Narenraju Nagarajan __affiliation__ = N/A __email__ = N/A __status__ = [‘inProgress’, ‘Archived’, ‘inUsage’, ‘Debugging’]

GitHub Repository: NULL

Documentation: NULL

Classes

SeedManager

Central seed manager for reproducible experiments.

Module Contents

class SeedManager(seed)[source]

Central seed manager for reproducible experiments.

Seeds Python’s random, NumPy’s global RNG, and exposes a dedicated numpy.random.Generator instance (self.rng) that is isolated from the global state. Child generators derived via spawn() are deterministic functions of the root seed and a name string, enabling independent reproducible streams for different pipeline components without interfering with each other.

Parameters:

seed (int) – Root random seed. All child generators are derived from this value.

seed[source]

The root seed as an integer.

Type:

int

rng[source]

Independent NumPy generator for library-internal use.

Type:

numpy.random.Generator

seed[source]
rng[source]
spawn(name)[source]

Create a deterministic child RNG derived from the root seed and a name.

Parameters:

name (str) – Unique identifier for the child stream (e.g. "noise_sampler").

Returns:

A fresh generator that is reproducible given (seed, name).

Return type:

numpy.random.Generator