# configure_deterministic_mode#

composer.utils.reproducibility.configure_deterministic_mode()[source]#

Configure PyTorch deterministic mode.

Note

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

>>> trainer = Trainer(deterministic_mode=True)


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

Note

When training on a GPU, this function must be invoked before any CUDA operations.

Note

Deterministic mode degrades performance. Do not use outside of testing and debugging.