diff --git a/src/lightning/pytorch/utilities/migration/utils.py b/src/lightning/pytorch/utilities/migration/utils.py index a5da66fd8de2c..385cc6b266fc0 100644 --- a/src/lightning/pytorch/utilities/migration/utils.py +++ b/src/lightning/pytorch/utilities/migration/utils.py @@ -70,7 +70,7 @@ def migrate_checkpoint( return checkpoint, applied_migrations -_lock = threading.Lock() +# _lock = threading.Lock() class pl_legacy_patch: @@ -89,7 +89,7 @@ class pl_legacy_patch: """ def __enter__(self) -> "pl_legacy_patch": - _lock.acquire() + # _lock.acquire() # `pl.utilities.argparse_utils` was renamed to `pl.utilities.argparse` legacy_argparse_module = ModuleType("lightning.pytorch.utilities.argparse_utils") sys.modules["lightning.pytorch.utilities.argparse_utils"] = legacy_argparse_module @@ -108,7 +108,7 @@ def __exit__( if hasattr(pl.utilities.argparse, "_gpus_arg_default"): delattr(pl.utilities.argparse, "_gpus_arg_default") del sys.modules["lightning.pytorch.utilities.argparse_utils"] - _lock.release() + # _lock.release() def _pl_migrate_checkpoint(checkpoint: _CHECKPOINT, checkpoint_path: Optional[_PATH] = None) -> _CHECKPOINT: