diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a240462..1ce2fe73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/pytorch_lightning/trainer/trainer.py b/pytorch_lightning/trainer/trainer.py index e4a33fb4..20ef14ca 100644 --- a/pytorch_lightning/trainer/trainer.py +++ b/pytorch_lightning/trainer/trainer.py @@ -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(