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

Fix bug with from_argparse and finetune #382

Merged
merged 3 commits into from
Jun 8, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/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)