From b1e80aff05b8912f593122c87c32b932f9a1fac1 Mon Sep 17 00:00:00 2001 From: Ethan Harris Date: Tue, 8 Jun 2021 15:31:45 +0100 Subject: [PATCH 1/3] Fix bug with from_argparse and finetune --- CHANGELOG.md | 6 ++++++ flash/core/trainer.py | 2 +- tests/core/test_trainer.py | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a8e2dde94..2f0a360b8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). +## [0.3.2] - 2021-06-08 + +### Fixed + +- Fixed a bug where `flash.Trainer.from_argparse_args` + `finetune` would not work + ## [0.3.1] - 2021-06-08 ### Added diff --git a/flash/core/trainer.py b/flash/core/trainer.py index b07a085123..7879259809 100644 --- a/flash/core/trainer.py +++ b/flash/core/trainer.py @@ -202,4 +202,4 @@ def add_argparse_args(cls, *args, **kwargs) -> ArgumentParser: def from_argparse_args(cls, args: Union[Namespace, ArgumentParser], **kwargs) -> 'Trainer': # the lightning trainer implementation does not support subclasses. # context: https://github.com/PyTorchLightning/lightning-flash/issues/342#issuecomment-848892447 - return from_argparse_args(PlTrainer, args, **kwargs) + return from_argparse_args(Trainer, args, **kwargs) diff --git a/tests/core/test_trainer.py b/tests/core/test_trainer.py index 8d296e0a31..98dea1e8d0 100644 --- a/tests/core/test_trainer.py +++ b/tests/core/test_trainer.py @@ -126,3 +126,4 @@ def test_from_argparse_args(): args = parser.parse_args(['--max_epochs=200']) trainer = Trainer.from_argparse_args(args) assert trainer.max_epochs == 200 + assert isinstance(trainer, Trainer) From 64f3059978cef4c6a5ed94008b657654e2493281 Mon Sep 17 00:00:00 2001 From: Ethan Harris Date: Tue, 8 Jun 2021 15:34:13 +0100 Subject: [PATCH 2/3] Add CHANGELOG link --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f0a360b8f..15e38a38c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ### Fixed -- Fixed a bug where `flash.Trainer.from_argparse_args` + `finetune` would not work +- Fixed a bug where `flash.Trainer.from_argparse_args` + `finetune` would not work ([#382](https://github.com/PyTorchLightning/lightning-flash/pull/382)) ## [0.3.1] - 2021-06-08 From 330ebe0076f459b3859703f8a2b9c5515cc9bd54 Mon Sep 17 00:00:00 2001 From: Ethan Harris Date: Tue, 8 Jun 2021 15:37:18 +0100 Subject: [PATCH 3/3] Bump version number --- flash/__about__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flash/__about__.py b/flash/__about__.py index 6d2cebac66..99127b0f23 100644 --- a/flash/__about__.py +++ b/flash/__about__.py @@ -1,4 +1,4 @@ -__version__ = "0.3.1" +__version__ = "0.3.2rc0" __author__ = "PyTorchLightning et al." __author_email__ = "name@pytorchlightning.ai" __license__ = 'Apache-2.0'