From 684dfd0a38a247911ac46a5c07880e4e8fd15466 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Tue, 25 Jun 2019 18:57:25 -0400 Subject: [PATCH] updated args --- docs/source/examples/fully_featured_trainer.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/source/examples/fully_featured_trainer.py b/docs/source/examples/fully_featured_trainer.py index ce213aa201..ac38ed18ea 100644 --- a/docs/source/examples/fully_featured_trainer.py +++ b/docs/source/examples/fully_featured_trainer.py @@ -92,13 +92,18 @@ def main(hparams, cluster, results_dict): mode=hparams.model_save_monitor_mode ) + # gpus are ; separated for inside a node and , within nodes + gpu_list = None + if hparams.gpus is not None: + gpu_list = map(int, hparams.gpus.split(';')) + # configure trainer trainer = Trainer( experiment=exp, cluster=cluster, checkpoint_callback=checkpoint, early_stop_callback=early_stop, - gpus=hparams.gpus + gpus=gpu_list ) # train model