Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
update local demo doc and configuration (#344)
Browse files Browse the repository at this point in the history
* update local demo doc and configuration

* change folder name

* Update tutorial_1_CR_exp_local_api.md

no need to have a new training file

* Delete mnist_gpu.py

no need to have a new training file

* Update config_gpu.yml

no need to have a new training file
  • Loading branch information
gongwuji authored and yangmao99 committed Nov 13, 2018
1 parent b345da0 commit 95a8f93
Show file tree
Hide file tree
Showing 22 changed files with 47 additions and 2 deletions.
29 changes: 27 additions & 2 deletions docs/tutorial_1_CR_exp_local_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ authorName: your_name
experimentName: auto_mnist
# how many trials could be concurrently running
trialConcurrency: 2
trialConcurrency: 1
# maximum experiment running duration
maxExecDuration: 3h
Expand Down Expand Up @@ -133,4 +133,29 @@ With all these steps done, we can run the experiment with the following command:
You can refer to [here](NNICTLDOC.md) for more usage guide of *nnictl* command line tool.

## View experiment results
The experiment has been running now, NNI provides WebUI for you to view experiment progress, to control your experiment, and some other appealing features. The WebUI is opened by default by `nnictl create`.
The experiment has been running now. Oher than *nnictl*, NNI also provides WebUI for you to view experiment progress, to control your experiment, and some other appealing features.

## Using multiple local GPUs to speed up search
The following steps assume that you have 4 NVIDIA GPUs installed at local and [tensorflow with GPU support](https://www.tensorflow.org/install/gpu). The demo enables 4 concurrent trail jobs and each trail job uses 1 GPU.

**Prepare configure file**: NNI provides a demo configuration file for the setting above, `cat ~/nni/examples/trials/mnist-annotation/config_gpu.yml` to see it. The trailConcurrency and gpuNum are different from the basic configure file:

```
...
# how many trials could be concurrently running
trialConcurrency: 4
...
trial:
command: python mnist.py
codeDir: ~/nni/examples/trials/mnist-annotation
gpuNum: 1
```

We can run the experiment with the following command:

nnictl create --config ~/nni/examples/trials/mnist-annotation/config_gpu.yml

You can use *nnictl* command line tool or WebUI to trace the training progress. *nvidia_smi* command line tool can also help you to monitor the GPU usage during training.
20 changes: 20 additions & 0 deletions examples/trials/mnist-annotation/config_gpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
authorName: default
experimentName: example_mnist
trialConcurrency: 4
maxExecDuration: 1h
maxTrialNum: 10
#choice: local, remote, pai
trainingServicePlatform: local
#choice: true, false
useAnnotation: true
tuner:
#choice: TPE, Random, Anneal, Evolution, BatchTuner
#SMAC (SMAC should be installed through nnictl)
builtinTunerName: TPE
classArgs:
#choice: maximize, minimize
optimize_mode: maximize
trial:
command: python3 mnist.py
codeDir: .
gpuNum: 1

0 comments on commit 95a8f93

Please sign in to comment.