clarify the usage of set determinism
@@ -239,6 +239,13 @@ def set_determinism(
use_deterministic_algorithms: Set whether PyTorch operations must use "deterministic" algorithms.
additional_settings: additional settings that need to set random seed.
+ Note:
+
+ This function will not affect the randomizable objects in :py:class:`monai.transforms.Randomizable`, which
+ have independent random states. For those objects, the ``set_random_state()`` method should be used to
+ ensure the deterministic behavior (alternatively, :py:class:`monai.data.DataLoader` by default sets the seeds
+ according to the global random state, please see also: :py:class:`monai.data.utils.worker_init_fn` and
+ :py:class:`monai.data.utils.set_rnd`).
"""
if seed is None:
# cast to 32 bit seed for CUDA
