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