From d9bdc56b6a9bab71d2d7bdb362a754380adb1309 Mon Sep 17 00:00:00 2001 From: Gyeongjae Choi Date: Thu, 6 May 2021 22:35:12 +0900 Subject: [PATCH] Add _gpus_arg_default in argparse_utils for backward compatibility (#7402) --- pytorch_lightning/utilities/argparse_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pytorch_lightning/utilities/argparse_utils.py b/pytorch_lightning/utilities/argparse_utils.py index 80db2429f7..17f0e9b8cc 100644 --- a/pytorch_lightning/utilities/argparse_utils.py +++ b/pytorch_lightning/utilities/argparse_utils.py @@ -3,3 +3,7 @@ from pytorch_lightning.utilities import rank_zero_deprecation rank_zero_deprecation("`argparse_utils` package has been renamed to `argparse` since v1.2 and will be removed in v1.4") from pytorch_lightning.utilities.argparse import * # noqa: F403 E402 F401 + +# for backward compatibility with old checkpoints (versions < 1.2.0) +# that need to be able to unpickle the function from the checkpoint +from pytorch_lightning.utilities.argparse import _gpus_arg_default # noqa: E402 F401 # isort: skip