changed hard coded paramater, and moved it to parent_parser (#238)

* changed hard coded paramater, and moved it to parent_parser

```python

    # ------------------------
    # 4 INIT TRAINER
    # ------------------------
    trainer = Trainer(
        experiment=exp,
        checkpoint_callback=checkpoint,
        early_stop_callback=early_stop,
        gpus=hparams.gpus,
        distributed_backend=hparams.dist_bak_end
    )


    parent_parser.add_argument('--dist_bak_end', type=str, default='ddp',
                                help='When using multiple GPUs set Trainer(distributed_backend=dp) (or ddp)')  
```

* Update single_gpu_node_ddp_template.py
This commit is contained in:
Oscar A. Rangel
2019-09-21 09:44:08 -04:00
committed by William Falcon
parent 87708157bc
commit 6803018a49
@@ -71,7 +71,7 @@ def main(hparams):
checkpoint_callback=checkpoint,
early_stop_callback=early_stop,
gpus=hparams.gpus,
distributed_backend='ddp'
distributed_backend=hparams.dist_backend
)
# ------------------------
@@ -95,6 +95,8 @@ if __name__ == '__main__':
parent_parser.add_argument('--gpus', type=str, default='-1',
help='how many gpus to use in the node.'
' value -1 uses all the gpus on the node')
parent_parser.add_argument('--dist_backend', type=str, default='ddp',
help='When using multiple GPUs set Trainer(distributed_backend=dp) (or ddp)')
parent_parser.add_argument('--test_tube_save_path', type=str, default=test_tube_dir,
help='where to save logs')
parent_parser.add_argument('--model_save_path', type=str, default=checkpoint_dir,