From cac02a04ba78a4bb69648f2918dbbf5798d5d84f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Tue, 26 Apr 2022 18:55:07 +0200 Subject: [PATCH] Update `jsonargparse` to unblock master (#12884) Co-authored-by: Mauricio Villegas --- pytorch_lightning/utilities/cli.py | 2 +- pytorch_lightning/utilities/imports.py | 2 +- requirements/extra.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pytorch_lightning/utilities/cli.py b/pytorch_lightning/utilities/cli.py index a784cbe062..2ef5fd97d5 100644 --- a/pytorch_lightning/utilities/cli.py +++ b/pytorch_lightning/utilities/cli.py @@ -889,7 +889,7 @@ def instantiate_class(args: Union[Any, Tuple[Any, ...]], init: Dict[str, Any]) - def _get_short_description(component: object) -> Optional[str]: - parse = import_docstring_parse("LightningCLI(run=True)") + parse, _ = import_docstring_parse("LightningCLI(run=True)") try: docstring = parse(component.__doc__) return docstring.short_description diff --git a/pytorch_lightning/utilities/imports.py b/pytorch_lightning/utilities/imports.py index 569e353020..9bf0fdd046 100644 --- a/pytorch_lightning/utilities/imports.py +++ b/pytorch_lightning/utilities/imports.py @@ -107,7 +107,7 @@ _GROUP_AVAILABLE = not _IS_WINDOWS and _module_available("torch.distributed.grou _HOROVOD_AVAILABLE = _module_available("horovod.torch") _HYDRA_AVAILABLE = _package_available("hydra") _HYDRA_EXPERIMENTAL_AVAILABLE = _module_available("hydra.experimental") -_JSONARGPARSE_AVAILABLE = _package_available("jsonargparse") and _compare_version("jsonargparse", operator.ge, "4.6.0") +_JSONARGPARSE_AVAILABLE = _package_available("jsonargparse") and _compare_version("jsonargparse", operator.ge, "4.7.1") _KINETO_AVAILABLE = _TORCH_GREATER_EQUAL_1_8_1 and torch.profiler.kineto_available() _NEPTUNE_AVAILABLE = _package_available("neptune") _NEPTUNE_GREATER_EQUAL_0_9 = _NEPTUNE_AVAILABLE and _compare_version("neptune", operator.ge, "0.9.0") diff --git a/requirements/extra.txt b/requirements/extra.txt index 05ea48b8f2..aa5d15c3af 100644 --- a/requirements/extra.txt +++ b/requirements/extra.txt @@ -5,6 +5,6 @@ horovod>=0.21.2,!=0.24.0 # no need to install with [pytorch] as pytorch is alre torchtext>=0.9.* omegaconf>=2.0.5 hydra-core>=1.0.5 -jsonargparse[signatures]>=4.6.0 +jsonargparse[signatures]>=4.7.1 gcsfs>=2021.5.0 rich>=10.2.2,!=10.15.*