Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Fix bug with from_argparse and finetune (#382)
Browse files Browse the repository at this point in the history
* Fix bug with from_argparse and finetune

* Add CHANGELOG link

* Bump version number
  • Loading branch information
ethanwharris authored Jun 8, 2021
1 parent 5a4d94b commit 7d4330b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion flash/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.3.1"
__version__ = "0.3.2rc0"
__author__ = "PyTorchLightning et al."
__author_email__ = "[email protected]"
__license__ = 'Apache-2.0'
Expand Down
2 changes: 1 addition & 1 deletion flash/core/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions tests/core/test_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 7d4330b

Please sign in to comment.