mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-12 12:40:20 +08:00
ddp pickle
This commit is contained in:
@@ -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):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user