diff --git a/README.md b/README.md index 3020bdf8..bec8e709 100644 --- a/README.md +++ b/README.md @@ -69,8 +69,11 @@ cd pytorch-lightning/docs/source/examples # run demo (on cpu) python fully_featured_trainer.py -# run demo on 2 gpus +# run a grid search on two gpus python fully_featured_trainer.py --gpus "0;1" + +# run single model on multiple gpus +python fully_featured_trainer.py --gpus "0;1" --interactive ``` #### Basic trainer example diff --git a/docs/source/examples/fully_featured_trainer.py b/docs/source/examples/fully_featured_trainer.py index 736fa284..ad622fce 100644 --- a/docs/source/examples/fully_featured_trainer.py +++ b/docs/source/examples/fully_featured_trainer.py @@ -188,9 +188,9 @@ if __name__ == '__main__': # single or multiple GPUs on same machine gpu_ids = hyperparams.gpus.split(';') - if hyperparams.live: + if hyperparams.interactive: # run on 1 gpu - print(f'RUNNING INTERACTIVE TRIAL ON GPUS. gpu ids: {gpu_ids}') + print(f'RUNNING INTERACTIVE MODE ON GPUS. gpu ids: {gpu_ids}') os.environ["CUDA_VISIBLE_DEVICES"] = gpu_ids main(hyperparams, None, None) diff --git a/pytorch_lightning/utils/arg_parse.py b/pytorch_lightning/utils/arg_parse.py index 962ef78e..e1beab8b 100644 --- a/pytorch_lightning/utils/arg_parse.py +++ b/pytorch_lightning/utils/arg_parse.py @@ -68,7 +68,7 @@ def add_default_args(parser, root_dir, rand_seed=None, possible_model_names=None if rand_seed is not None: parser.add_argument('--random_seed', default=rand_seed, type=int) - parser.add_argument('--live', dest='live', action='store_true', help='runs on gpu without cluster') + parser.add_argument('--interactive', dest='interactive', action='store_true', help='runs on gpu without cluster') parser.add_argument('--debug', dest='debug', action='store_true', help='enables/disables test tube') parser.add_argument('--local', dest='local', action='store_true', help='enables local tng')