diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a8e2dde94..15e38a38c9 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 ([#382](https://github.com/PyTorchLightning/lightning-flash/pull/382)) + ## [0.3.1] - 2021-06-08 ### Added 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' 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)