mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
fix boolean argparse (#1571)
* fix boolean argparse #1570 * update change log
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user