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.
- Loading branch information
Deshui Yu
committed
Aug 20, 2018
1 parent
781cea2
commit 252f36f
Showing
214 changed files
with
33,151 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.ts text eol=lf | ||
*.py text eol=lf | ||
*.sh text eol=lf |
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,70 @@ | ||
BIN_PATH ?= /usr/bin | ||
NODE_PATH ?= /usr/share | ||
EXAMPLE_PATH ?= /usr/share/nni/examples | ||
|
||
SRC_DIR := ${PWD} | ||
|
||
.PHONY: build install uninstall | ||
|
||
build: | ||
### Building NNI Manager ### | ||
cd src/nni_manager && yarn && yarn build | ||
|
||
### Building Web UI ### | ||
cd src/webui && yarn && yarn build | ||
|
||
### Building Python SDK ### | ||
cd src/sdk/pynni && python3 setup.py build | ||
|
||
### Building nnictl ### | ||
cd tools && python3 setup.py build | ||
|
||
|
||
install: | ||
mkdir -p $(NODE_PATH)/nni | ||
mkdir -p $(EXAMPLE_PATH) | ||
|
||
### Installing NNI Manager ### | ||
cp -rT src/nni_manager/dist $(NODE_PATH)/nni/nni_manager | ||
cp -rT src/nni_manager/node_modules $(NODE_PATH)/nni/nni_manager/node_modules | ||
|
||
### Installing Web UI ### | ||
cp -rT src/webui/build $(NODE_PATH)/nni/webui | ||
ln -sf $(NODE_PATH)/nni/nni_manager/node_modules/serve/bin/serve.js $(BIN_PATH)/serve | ||
|
||
### Installing Python SDK dependencies ### | ||
pip3 install -r src/sdk/pynni/requirements.txt | ||
### Installing Python SDK ### | ||
cd src/sdk/pynni && python3 setup.py install | ||
|
||
### Installing nnictl ### | ||
cd tools && python3 setup.py install | ||
|
||
echo '#!/bin/sh' > $(BIN_PATH)/nnimanager | ||
echo 'cd $(NODE_PATH)/nni/nni_manager && node main.js $$@' >> $(BIN_PATH)/nnimanager | ||
chmod +x $(BIN_PATH)/nnimanager | ||
|
||
install -m 755 tools/nnictl $(BIN_PATH)/nnictl | ||
|
||
### Installing examples ### | ||
cp -rT examples $(EXAMPLE_PATH) | ||
|
||
|
||
dev-install: | ||
### Installing Python SDK dependencies ### | ||
pip3 install --user -r src/sdk/pynni/requirements.txt | ||
### Installing Python SDK ### | ||
cd src/sdk/pynni && pip3 install --user -e . | ||
|
||
### Installing nnictl ### | ||
cd tools && pip3 install --user -e . | ||
|
||
|
||
uninstall: | ||
-rm -r $(EXAMPLE_PATH) | ||
-rm -r $(NODE_PATH)/nni | ||
-pip3 uninstall -y nnictl | ||
-pip3 uninstall -y nni | ||
-rm $(BIN_PATH)/nnictl | ||
-rm $(BIN_PATH)/nnimanager | ||
-rm $(BIN_PATH)/serve |
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,14 +1,21 @@ | ||
# Introduction | ||
Neural Network Intelligence(NNI) is a light package for supporting hyper-parameter tuning or neural architecture search. | ||
It could easily run in different environments, such as: local/remote machine/cloud. | ||
And it offers a new annotation language for user to conveniently design search space. | ||
Also user could write code using any language or any machine learning framework. | ||
|
||
# Contributing | ||
# Getting Started | ||
TODO: Guide users through getting your code up and running on their own system. In this section you can talk about: | ||
1. Installation process | ||
2. Software dependencies | ||
3. Latest releases | ||
4. API references | ||
|
||
This project welcomes contributions and suggestions. Most contributions require you to agree to a | ||
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us | ||
the rights to use your contribution. For details, visit https://cla.microsoft.com. | ||
# Build and Test | ||
TODO: Describe and show how to build your code and run the tests. | ||
|
||
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide | ||
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions | ||
provided by the bot. You will only need to do this once across all repos using our CLA. | ||
# Contribute | ||
TODO: Explain how other users and developers can contribute to make your code better. | ||
|
||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). | ||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or | ||
contact [[email protected]](mailto:[email protected]) with any additional questions or comments. | ||
# Privacy Statement | ||
The [Microsoft Enterprise and Developer Privacy Statement](https://privacy.microsoft.com/en-us/privacystatement) describes the privacy statement of this software. |
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,60 @@ | ||
**Enable Assessor in your expeirment** | ||
=== | ||
Assessor module is for assessing running trials. One common use case is early stopping, which terminates unpromising trial jobs based on their intermediate results. | ||
|
||
## Using NNI built-in Assessor | ||
Here we use the same example `examples/trials/mnist-annotation`. We use `Medianstop` assessor for this experiment. The yaml configure file is shown below: | ||
``` | ||
authorName: your_name | ||
experimentName: auto_mnist | ||
# how many trials could be concurrently running | ||
trialConcurrency: 2 | ||
# maximum experiment running duration | ||
maxExecDuration: 3h | ||
# empty means never stop | ||
maxTrialNum: 100 | ||
# choice: local, remote | ||
trainingServicePlatform: local | ||
# choice: true, false | ||
useAnnotation: true | ||
tuner: | ||
tunerName: TPE | ||
optimizationMode: Maximize | ||
assessor: | ||
assessorName: Medianstop | ||
optimizationMode: Maximize | ||
trial: | ||
trialCommand: python mnist.py | ||
trialCodeDir: /usr/share/nni/examples/trials/mnist-annotation | ||
trialGpuNum: 0 | ||
``` | ||
For our built-in assessors, you need to fill two fields: `assessorName` which chooses NNI provided assessors (refer to [here]() for built-in assessors), `optimizationMode` which includes Maximize and Minimize (you want to maximize or minimize your trial result). | ||
|
||
## Using user customized Assessor | ||
You can also write your own assessor following the guidance [here](). For example, you wrote an assessor for `examples/trials/mnist-annotation`. You should prepare the yaml configure below: | ||
``` | ||
authorName: your_name | ||
experimentName: auto_mnist | ||
# how many trials could be concurrently running | ||
trialConcurrency: 2 | ||
# maximum experiment running duration | ||
maxExecDuration: 3h | ||
# empty means never stop | ||
maxTrialNum: 100 | ||
# choice: local, remote | ||
trainingServicePlatform: local | ||
# choice: true, false | ||
useAnnotation: true | ||
tuner: | ||
tunerName: TPE | ||
optimizationMode: Maximize | ||
assessor: | ||
assessorCommand: your_command | ||
assessorCodeDir: /path/of/your/asessor | ||
assessorGpuNum: 0 | ||
trial: | ||
trialCommand: python mnist.py | ||
trialCodeDir: /usr/share/nni/examples/trials/mnist-annotation | ||
trialGpuNum: 0 | ||
``` | ||
You only need to fill three field: `assessorCommand`, `assessorCodeDir` and `assessorGpuNum`. |
Oops, something went wrong.