blazefl.utils.seed_everything

blazefl.utils.seed_everything#

blazefl.utils.seed_everything(seed: int, device: str) None[source]#

Seed random number generators for reproducibility.

This function sets seeds for Python’s random module, NumPy, and PyTorch to ensure deterministic behavior in experiments.

Parameters:
  • seed (int) – The seed value to set.

  • device (str) – The device type (‘cpu’ or ‘cuda’).

Returns:

None