seed_all#

composer.utils.reproducibility.seed_all(seed)[source]#

Seed all rng objects.

Note

When using the Trainer, you can use the seed parameter instead of invoking this function directly. For example:

>>> trainer = Trainer(seed=42)

However, to configure the random seed for operations before the trainer is initialized, manually invoke this function at the beginning of your training script.

Parameters

seed (int) โ€“ The random seed