Closed
Description
Is your feature request related to a problem? Please describe.
Issue reported from the internal team, set_determinism
raises error when disable_global_flags:
set_determinism(seed=seed)
File "/workspace/data/medical/MONAI/monai/utils/misc.py", line 255, in set_determinism
torch.backends.cudnn.deterministic = True
File "/opt/conda/lib/python3.8/site-packages/torch/backends/__init__.py", line 38, in __set__
raise RuntimeError("not allowed to set %s flags "
RuntimeError: not allowed to set torch.backends.cudnn flags after disable_global_flags; please use flags() context manager instead
Would be nice to enhance the utility for the global status