fix boolean argparse (#1571)

* fix boolean argparse #1570

* update change log
This commit is contained in:
Ferdinand Schlatt
2020-04-23 11:44:18 -04:00
committed by GitHub
parent 759557050a
commit 545b38ec5f
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -62,6 +62,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed a bug that caused the `callbacks` Trainer argument to reference a global variable ([#1534](https://github.com/PyTorchLightning/pytorch-lightning/pull/1534)).
- Fixed a bug that set all boolean CLI arguments from Trainer.add_argparse_args always to True ([#1570](https://github.com/PyTorchLightning/pytorch-lightning/issues/1570))
## [0.7.3] - 2020-04-09
+1 -1
View File
@@ -603,7 +603,7 @@ class Trainer(
for arg, arg_types, arg_default in (at for at in cls.get_init_arguments_and_types()
if at[0] not in depr_arg_names):
for allowed_type in (at for at in allowed_types if at in arg_types):
if isinstance(allowed_type, bool):
if allowed_type is bool:
def allowed_type(x):
return bool(distutils.util.strtobool(x))
parser.add_argument(