From d0081778f8201ddf6bcfc1adb66abea643ca03c9 Mon Sep 17 00:00:00 2001 From: Mauricio Villegas Date: Mon, 17 May 2021 09:53:00 +0200 Subject: [PATCH] Enable fsspec by default for cli config file (#7521) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Adrian Wälchli --- CHANGELOG.md | 3 +++ pytorch_lightning/utilities/cli.py | 3 ++- requirements/extra.txt | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index caacf2eb37..fea7a41400 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ### Added +- Added LightningCLI support for config files on object stores ([#7521](https://github.com/PyTorchLightning/pytorch-lightning/pull/7521)) + + - Added argument `trainer.predict(ckpt_path)` ([#7430](https://github.com/PyTorchLightning/pytorch-lightning/pull/7430)) diff --git a/pytorch_lightning/utilities/cli.py b/pytorch_lightning/utilities/cli.py index da6592ae66..5dccad4ab9 100644 --- a/pytorch_lightning/utilities/cli.py +++ b/pytorch_lightning/utilities/cli.py @@ -24,7 +24,8 @@ from pytorch_lightning.utilities.seed import seed_everything _JSONARGPARSE_AVAILABLE = _module_available("jsonargparse") if _JSONARGPARSE_AVAILABLE: - from jsonargparse import ActionConfigFile, ArgumentParser + from jsonargparse import ActionConfigFile, ArgumentParser, set_config_read_mode + set_config_read_mode(fsspec_enabled=True) else: ArgumentParser = object diff --git a/requirements/extra.txt b/requirements/extra.txt index db2e66540e..c41f464ef3 100644 --- a/requirements/extra.txt +++ b/requirements/extra.txt @@ -7,4 +7,4 @@ torchtext>=0.5 # onnx>=1.7.0 onnxruntime>=1.3.0 hydra-core>=1.0 -jsonargparse[signatures]>=3.11.1 +jsonargparse[signatures]>=3.12.0