ddp pickle

This commit is contained in:
William Falcon 2020-04-27 07:08:34 -04:00
parent d5dff384eb
commit d2989f76e6
1 changed files with 14 additions and 13 deletions

View File

@ -614,19 +614,8 @@ class Trainer(
return bool(parsing.strtobool(x))
if arg == 'gpus':
def allowed_type(x):
if ',' in x:
return str(x)
else:
return int(x)
def arg_default_fx(x):
if ',' in x:
return str(x)
else:
return int(x)
arg_default = arg_default_fx
allowed_type = Trainer.allowed_type
arg_default = Trainer.arg_default
parser.add_argument(
f'--{arg}',
@ -639,6 +628,18 @@ class Trainer(
return parser
def allowed_type(x):
if ',' in x:
return str(x)
else:
return int(x)
def arg_default(x):
if ',' in x:
return str(x)
else:
return int(x)
@classmethod
def from_argparse_args(cls, args, **kwargs):