forked from microsoft/nni
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from Microsoft/master
merge master
- Loading branch information
Showing
14 changed files
with
411 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
theme: jekyll-theme-leap-day | ||
theme: jekyll-theme-dinky |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Introduction | ||
|
||
For good user experience and reduce user effort, we need to design a good annotation grammar. | ||
|
||
If users use NNI system, they only need to: | ||
|
||
1. Annotation variable in code as: | ||
|
||
'''@nni.variable(nni.choice(2,3,5,7),name=self.conv_size)''' | ||
|
||
2. Annotation intermediate in code as: | ||
|
||
'''@nni.report_intermediate_result(test_acc)''' | ||
|
||
3. Annotation output in code as: | ||
|
||
'''@nni.report_final_result(test_acc)''' | ||
|
||
4. Annotation `function_choice` in code as: | ||
|
||
'''@nni.function_choice(max_pool(h_conv1, self.pool_size),avg_pool(h_conv1, self.pool_size),name=max_pool)''' | ||
|
||
In this way, they can easily realize automatic tuning on NNI. | ||
|
||
For `@nni.variable`, `nni.choice` is the type of search space and there are 10 types to express your search space as follows: | ||
|
||
1. `@nni.variable(nni.choice(option1,option2,...,optionN),name=variable)` | ||
Which means the variable value is one of the options, which should be a list The elements of options can themselves be stochastic expressions | ||
|
||
2. `@nni.variable(nni.randint(upper),name=variable)` | ||
Which means the variable value is a random integer in the range [0, upper). | ||
|
||
3. `@nni.variable(nni.uniform(low, high),name=variable)` | ||
Which means the variable value is a value uniformly between low and high. | ||
|
||
4. `@nni.variable(nni.quniform(low, high, q),name=variable)` | ||
Which means the variable value is a value like round(uniform(low, high) / q) * q | ||
|
||
5. `@nni.variable(nni.loguniform(low, high),name=variable)` | ||
Which means the variable value is a value drawn according to exp(uniform(low, high)) so that the logarithm of the return value is uniformly distributed. | ||
|
||
6. `@nni.variable(nni.qloguniform(low, high, q),name=variable)` | ||
Which means the variable value is a value like round(exp(uniform(low, high)) / q) * q | ||
|
||
7. `@nni.variable(nni.normal(label, mu, sigma),name=variable)` | ||
Which means the variable value is a real value that's normally-distributed with mean mu and standard deviation sigma. | ||
|
||
8. `@nni.variable(nni.qnormal(label, mu, sigma, q),name=variable)` | ||
Which means the variable value is a value like round(normal(mu, sigma) / q) * q | ||
|
||
9. `@nni.variable(nni.lognormal(label, mu, sigma),name=variable)` | ||
Which means the variable value is a value drawn according to exp(normal(mu, sigma)) | ||
|
||
10. `@nni.variable(nni.qlognormal(label, mu, sigma, q),name=variable)` | ||
Which means the variable value is a value like round(exp(normal(mu, sigma)) / q) * q |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
**How to Debug in NNI** | ||
=== | ||
|
||
*Coming soon* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
**Install NNI on Ubuntu** | ||
=== | ||
|
||
## **Installation** | ||
* __Dependencies__ | ||
|
||
python >= 3.5 | ||
git | ||
wget | ||
|
||
python pip should also be correctly installed. You could use "which pip" or "pip -V" to check in Linux. | ||
|
||
* Note: we don't support virtual environment in current releases. | ||
|
||
* __Install NNI through pip__ | ||
|
||
pip3 install -v --user git+https://github.com/Microsoft/nni.git@v0.1 | ||
source ~/.bashrc | ||
|
||
* __Install NNI through source code__ | ||
|
||
git clone -b v0.1 https://github.com/Microsoft/nni.git | ||
cd nni | ||
chmod +x install.sh | ||
source install.sh | ||
|
||
|
||
## Further reading | ||
* [Overview](Overview.md) | ||
* [Use command line tool nnictl](NNICTLDOC.md) | ||
* [Use NNIBoard](WebUI.md) | ||
* [Define search space](SearchSpaceSpec.md) | ||
* [Config an experiment](ExperimentConfig.md) | ||
* [How to run an experiment on local (with multiple GPUs)?](tutorial_1_CR_exp_local_api.md) | ||
* [How to run an experiment on multiple machines?](tutorial_2_RemoteMachineMode.md) | ||
* [How to run an experiment on OpenPAI?](PAIMode.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# NNI Overview | ||
|
||
NNI (Neural Network Intelligence) is a toolkit to help users run automated machine learning experiments. For each experiment, user only need to define a search space and update a few lines of code, and then leverage NNI build-in algorithms and training services to search the best hyper parameters and/or neural architecture. | ||
|
||
<p align="center"> | ||
<img src="./img/3_steps.jpg" alt="drawing"/> | ||
</p> | ||
|
||
After user submits the experiment through a command line tool [nnictl](../tools/README.md), a demon process (NNI manager) take care of search process. NNI manager continuously get search settings that generated by tuning algorithms, then NNI manager asks the training service component to dispatch and run trial jobs in a targeted training environment (e.g. local machine, remote servers and cloud). The results of trials jobs such as model accurate will send back to tuning algorithms for generating more meaningful search settings. NNI manager stops the search process after it find the best models. | ||
|
||
## Architecture Overview | ||
<p align="center"> | ||
<img src="./img/nni_arch_overview.png" alt="drawing"/> | ||
</p> | ||
|
||
User can use the nnictl and/or a visualized Web UI nniboard to monitor and debug a given experiment. | ||
|
||
<p align="center"> | ||
<img src="./img/overview.jpg" alt="drawing"/> | ||
</p> | ||
|
||
|
||
NNI provides a set of examples in the package to get you familiar with the above process. In the following example [/examples/trials/mnist], we had already set up the configuration and updated the training codes for you. You can directly run the following command to start an experiment. | ||
|
||
## Key Concepts | ||
|
||
**Experiment** in NNI is a method for testing different assumptions (hypotheses) by Trials under conditions constructed and controlled by NNI. During the experiment, one or more conditions are allowed to change in an organized manner and effects of these changes on associated conditions. | ||
|
||
### **Trial** | ||
**Trial** in NNI is an individual attempt at applying a set of parameters on a model. | ||
|
||
### **Tuner** | ||
**Tuner** in NNI is an implementation of Tuner API for a special tuning algorithm. [Read more about the Tuners supported in the latest NNI release](../src/sdk/pynni/nni/README.md) | ||
|
||
### **Assessor** | ||
**Assessor** in NNI is an implementation of Assessor API for optimizing the execution of experiment. | ||
|
||
|
||
## Learn More | ||
* [Get started](GetStarted.md) | ||
### **How to** | ||
* [Installation](InstallNNI_Ubuntu.md) | ||
* [Use command line tool nnictl](NNICTLDOC.md) | ||
* [Use NNIBoard](WebUI.md) | ||
* [Define search space](InstallNNI_Ubuntu.md) | ||
* [Use NNI sdk] - *coming soon* | ||
* [Config an experiment](SearchSpaceSpec.md) | ||
* [Use annotation](AnnotationSpec.md) | ||
* [Debug](HowToDebug.md) | ||
### **Tutorials** | ||
* [How to run an experiment on local (with multiple GPUs)?](tutorial_1_CR_exp_local_api.md) | ||
* [How to run an experiment on multiple machines?](tutorial_2_RemoteMachineMode.md) | ||
* [How to run an experiment on OpenPAI?](PAIMode.md) | ||
* [Try different tuners and assessors] - *coming soon* | ||
* [How to run an experiment on K8S services?] - *coming soon* | ||
* [Implement a customized tuner] - *coming soon* | ||
* [Implement a customized assessor] - *coming soon* | ||
* [Implement a custmoized weight sharing algorithm] - *coming soon* | ||
* [How to integrate NNI with your own custmoized training service] - *coming soon* | ||
### **Best practice** | ||
* [Compare different AutoML algorithms] - *coming soon* | ||
* [Serve NNI as a capability of a ML Platform] - *coming soon* |
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Oops, something went wrong.