Commit 26003953 authored by demianzhang's avatar demianzhang Committed by chicm-ms
Browse files

Update Windows local mode doc (#1019)

Update Windows local mode doc
parent a05db21b
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
NNI (Neural Network Intelligence) is a toolkit to help users run automated machine learning (AutoML) experiments. NNI (Neural Network Intelligence) is a toolkit to help users run automated machine learning (AutoML) experiments.
The tool dispatches and runs trial jobs generated by tuning algorithms to search the best neural architecture and/or hyper-parameters in different environments like local machine, remote servers and cloud. The tool dispatches and runs trial jobs generated by tuning algorithms to search the best neural architecture and/or hyper-parameters in different environments like local machine, remote servers and cloud.
### **NNI [v0.6](https://github.com/Microsoft/nni/releases) has been released!** ### **NNI [v0.7](https://github.com/Microsoft/nni/releases) has been released!**
<p align="center"> <p align="center">
<a href="#nni-v05-has-been-released"><img src="docs/img/overview.svg" /></a> <a href="#nni-v05-has-been-released"><img src="docs/img/overview.svg" /></a>
</p> </p>
...@@ -100,41 +100,65 @@ Targeting at openness and advancing state-of-art technology, [Microsoft Research ...@@ -100,41 +100,65 @@ Targeting at openness and advancing state-of-art technology, [Microsoft Research
We encourage researchers and students leverage these projects to accelerate the AI development and research. We encourage researchers and students leverage these projects to accelerate the AI development and research.
## **Install & Verify** ## **Install & Verify**
If you choose NNI Windows local mode and you use powershell to run script for the first time, you need to **run powershell as administrator** with this command first:
```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```
**Install through pip** **Install through pip**
* We support Linux and MacOS in current stage, Ubuntu 16.04 or higher, along with MacOS 10.14.1 are tested and supported. Simply run the following `pip install` in an environment that has `python >= 3.5`. * We support Linux, MacOS and Windows(local mode) in current stage, Ubuntu 16.04 or higher, MacOS 10.14.1 along with Windows 10.1809 are tested and supported. Simply run the following `pip install` in an environment that has `python >= 3.5`.
Linux and MacOS
```bash ```bash
python3 -m pip install --upgrade nni python3 -m pip install --upgrade nni
``` ```
Windows
```bash
python -m pip install --upgrade nni
```
Note: Note:
* `--user` can be added if you want to install NNI in your home directory, which does not require any special privileges. * `--user` can be added if you want to install NNI in your home directory, which does not require any special privileges.
* Currently NNI on Windows only support local mode. Anaconda is highly recommanded to install NNI on Windows.
* If there is any error like `Segmentation fault`, please refer to [FAQ](docs/en_US/FAQ.md) * If there is any error like `Segmentation fault`, please refer to [FAQ](docs/en_US/FAQ.md)
**Install through source code** **Install through source code**
* We support Linux (Ubuntu 16.04 or higher), MacOS (10.14.1) in our current stage. * We support Linux (Ubuntu 16.04 or higher), MacOS (10.14.1) and Windows local mode (10.1809) in our current stage.
Linux and MacOS
* Run the following commands in an environment that has `python >= 3.5`, `git` and `wget`. * Run the following commands in an environment that has `python >= 3.5`, `git` and `wget`.
```bash ```bash
git clone -b v0.6 https://github.com/Microsoft/nni.git git clone -b v0.7 https://github.com/Microsoft/nni.git
cd nni cd nni
source install.sh source install.sh
``` ```
Windows
For the system requirements of NNI, please refer to [Install NNI](docs/en_US/Installation.md) * Run the following commands in an environment that has `python >=3.5`, `git` and `powershell`
```bash
git clone -b v0.7 https://github.com/Microsoft/nni.git
cd nni
powershell ./install.ps1
```
For the system requirements of NNI, please refer to [Install NNI](docs/en_US/Installation.md)
For NNI Windows local mode, please refer to [NNI Windows local mode](docs/en_US/WindowsLocalMode.md)
**Verify install** **Verify install**
The following example is an experiment built on TensorFlow. Make sure you have **TensorFlow installed** before running it. The following example is an experiment built on TensorFlow. Make sure you have **TensorFlow installed** before running it.
* Download the examples via clone the source code. * Download the examples via clone the source code.
```bash ```bash
git clone -b v0.6 https://github.com/Microsoft/nni.git git clone -b v0.7 https://github.com/Microsoft/nni.git
``` ```
Linux and MacOS
* Run the mnist example. * Run the mnist example.
```bash ```bash
nnictl create --config nni/examples/trials/mnist/config.yml nnictl create --config nni/examples/trials/mnist/config.yml
``` ```
Windows
* Run the mnist example.
```bash
nnictl create --config nni/examples/trials/mnist/config_windows.yml
```
* Wait for the message `INFO: Successfully started experiment!` in the command line. This message indicates that your experiment has been successfully started. You can explore the experiment using the `Web UI url`. * Wait for the message `INFO: Successfully started experiment!` in the command line. This message indicates that your experiment has been successfully started. You can explore the experiment using the `Web UI url`.
``` ```
......
# Installation of NNI # Installation of NNI
Currently we support installation on Linux, Mac and Windows. Currently we support installation on Linux, Mac and Windows(local mode).
## **Installation on Linux & Mac** ## **Installation on Linux & Mac**
...@@ -15,7 +15,7 @@ Currently we support installation on Linux, Mac and Windows. ...@@ -15,7 +15,7 @@ Currently we support installation on Linux, Mac and Windows.
Prerequisite: `python >=3.5`, `git`, `wget` Prerequisite: `python >=3.5`, `git`, `wget`
```bash ```bash
git clone -b v0.6 https://github.com/Microsoft/nni.git git clone -b v0.7 https://github.com/Microsoft/nni.git
cd nni cd nni
./install.sh ./install.sh
``` ```
...@@ -24,11 +24,15 @@ Currently we support installation on Linux, Mac and Windows. ...@@ -24,11 +24,15 @@ Currently we support installation on Linux, Mac and Windows.
You can also install NNI in a docker image. Please follow the instructions [here](https://github.com/Microsoft/nni/tree/master/deployment/docker/README.md) to build NNI docker image. The NNI docker image can also be retrieved from Docker Hub through the command `docker pull msranni/nni:latest`. You can also install NNI in a docker image. Please follow the instructions [here](https://github.com/Microsoft/nni/tree/master/deployment/docker/README.md) to build NNI docker image. The NNI docker image can also be retrieved from Docker Hub through the command `docker pull msranni/nni:latest`.
## **Installation on Windows** ## **Installation on Windows**
When you use powershell to run script for the first time, you need **run powershell as administrator** with this command:
```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```
Anaconda is highly recommanded.
* __Install NNI through pip__ * __Install NNI through pip__
Prerequisite: `python >= 3.5` Prerequisite: `python(64-bit) >= 3.5`
```bash ```bash
python -m pip install --upgrade nni python -m pip install --upgrade nni
``` ```
...@@ -36,13 +40,9 @@ Currently we support installation on Linux, Mac and Windows. ...@@ -36,13 +40,9 @@ Currently we support installation on Linux, Mac and Windows.
* __Install NNI through source code__ * __Install NNI through source code__
Prerequisite: `python >=3.5`, `git`, `powershell` Prerequisite: `python >=3.5`, `git`, `powershell`
When you use powershell to run script for the first time, you need run powershell as Administrator with this command: you can install nni as administrator or current user as follows:
```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```
Then you can install nni as administrator or current user as follows:
```bash ```bash
git clone https://github.com/Microsoft/nni.git git clone -b v0.7 https://github.com/Microsoft/nni.git
cd nni cd nni
powershell ./install.ps1 powershell ./install.ps1
``` ```
...@@ -73,7 +73,7 @@ Below are the minimum system requirements for NNI on macOS. Due to potential pro ...@@ -73,7 +73,7 @@ Below are the minimum system requirements for NNI on macOS. Due to potential pro
|**Internet**|Boardband internet connection| |**Internet**|Boardband internet connection|
|**Resolution**|1024 x 768 minimum display resolution| |**Resolution**|1024 x 768 minimum display resolution|
Below are the minimum system requirements for NNI on Windows. Due to potential programming changes, the minimum system requirements for NNI may change over time. Below are the minimum system requirements for NNI on Windows, Windows 10.1809 is well tested and recommend. Due to potential programming changes, the minimum system requirements for NNI may change over time.
||Minimum Requirements|Recommended Specifications| ||Minimum Requirements|Recommended Specifications|
|---|---|---| |---|---|---|
...@@ -96,4 +96,4 @@ Below are the minimum system requirements for NNI on Windows. Due to potential p ...@@ -96,4 +96,4 @@ Below are the minimum system requirements for NNI on Windows. Due to potential p
* [How to run an experiment on multiple machines?](RemoteMachineMode.md) * [How to run an experiment on multiple machines?](RemoteMachineMode.md)
* [How to run an experiment on OpenPAI?](PAIMode.md) * [How to run an experiment on OpenPAI?](PAIMode.md)
* [How to run an experiment on Kubernetes through Kubeflow?](KubeflowMode.md) * [How to run an experiment on Kubernetes through Kubeflow?](KubeflowMode.md)
* [How to run an experiment on Kubernetes through FrameworkController?](FrameworkControllerMode.md) * [How to run an experiment on Kubernetes through FrameworkController?](FrameworkControllerMode.md)
\ No newline at end of file
...@@ -2,15 +2,18 @@ ...@@ -2,15 +2,18 @@
## Installation ## Installation
We support Linux and MacOS in current stage, Ubuntu 16.04 or higher and MacOS 10.14.1 are tested and supported. Simply run the following `pip install` in an environment that has `python >= 3.5`. We support Linux MacOS and Windows(local mode) in current stage, Ubuntu 16.04 or higher, MacOS 10.14.1 and Windows 10.1809 are tested and supported. Simply run the following `pip install` in an environment that has `python >= 3.5`.
#### Linux and MacOS
```bash ```bash
python3 -m pip install --upgrade nni python3 -m pip install --upgrade nni
``` ```
#### Windows
```bash
python -m pip install --upgrade nni
```
Note: Note:
* `--user` can be added if you want to install NNI in your home directory, which does not require any special privileges. * For Linux and MacOS `--user` can be added if you want to install NNI in your home directory, which does not require any special privileges.
* If there is any error like `Segmentation fault`, please refer to [FAQ](FAQ.md) * If there is any error like `Segmentation fault`, please refer to [FAQ](FAQ.md)
* For the `system requirements` of NNI, please refer to [Install NNI](Installation.md) * For the `system requirements` of NNI, please refer to [Install NNI](Installation.md)
...@@ -124,16 +127,27 @@ trial: ...@@ -124,16 +127,27 @@ trial:
codeDir: . codeDir: .
gpuNum: 0 gpuNum: 0
``` ```
Note:
* **For Windows, you need to change trial command `python3` to `python`**
*Implemented code directory: [config.yml](https://github.com/Microsoft/nni/tree/master/examples/trials/mnist/config.yml)* *Implemented code directory: [config.yml](https://github.com/Microsoft/nni/tree/master/examples/trials/mnist/config.yml)*
All the codes above are already prepared and stored in [examples/trials/mnist/](https://github.com/Microsoft/nni/tree/master/examples/trials/mnist). All the codes above are already prepared and stored in [examples/trials/mnist/](https://github.com/Microsoft/nni/tree/master/examples/trials/mnist).
If you choose Windows local mode and use powershell to run script for the first time, you need run powershell as administrator with this command
```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```
When these things are done, **run the config.yml file from your command line to start the experiment**. When these things are done, **run the config.yml file from your command line to start the experiment**.
```bash ```bash
nnictl create --config nni/examples/trials/mnist/config.yml nnictl create --config nni/examples/trials/mnist/config.yml
``` ```
If you use windows local mode and forget to change the trial command `python3` to `python` in config.yml, **then run the config_windows.yml file from your command line to start the experiment**.
```bash
nnictl create --config nni/examples/trials/mnist/config_windows.yml
```
Note: **nnictl** is a command line tool, which can be used to control experiments, such as start/stop/resume an experiment, start/stop NNIBoard, etc. Click [here](NNICTLDOC.md) for more usage of `nnictl` Note: **nnictl** is a command line tool, which can be used to control experiments, such as start/stop/resume an experiment, start/stop NNIBoard, etc. Click [here](NNICTLDOC.md) for more usage of `nnictl`
......
# Windows Local Mode (experimental feature)
Currently we only support local mode on Windows. Windows 10.1809 is well tested and recommended.
## **Installation on Windows**
**Anaconda python(64-bit) is highly recommended.**
When you use powershell to run script for the first time, you need **run powershell as administrator** with this command:
```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```
* __Install NNI through pip__
Prerequisite: `python(64-bit) >= 3.5`
```bash
python -m pip install --upgrade nni
```
* __Install NNI through source code__
Prerequisite: `python >=3.5`, `git`, `powershell`
```bash
git clone -b v0.7 https://github.com/Microsoft/nni.git
cd nni
powershell ./install.ps1
```
When these things are done, run the **config_windows.yml** file from your command line to start the experiment.
```bash
nnictl create --config nni/examples/trials/mnist/config_windows.yml
```
For other examples you need to change trial command `python3` into `python` in each example yaml.
## **Frequent met errors and answers**
### simplejson failed when installing nni
Make sure C++ 14.0 compiler installed.
>builging 'simplejson._speedups' extension error: [WinError 3] The system cannot find the path specified
### Fail to run powershell when install nni from source
If you run powershell script for the first time and did not set the execution policies for executing the script, you will meet this error below. Try to run powershell as administrator with this command first:
```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```
>...cannot be loaded because running scripts is disabled on this system.
### Trial failed with missing DLL in cmd or powershell
This error caused by missing LIBIFCOREMD.DLL and LIBMMD.DLL and fail to install scipy. Anaconda python is highly recommended. If you use official python, make sure you have one of `Visual Studio`, `MATLAB`, `MKL` and `Intel Distribution for Python` installed on Windows before running nni. If not, try to install one of the softwares above or change to use Anaconda python(64-bit).
>ImportError: DLL load failed
### Trial failed on webUI
Please check the trial log file stderr for more details. If there is no such file and nni is installed through pip, then you need to run powershell as administrator with this command first:
```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```
If there is a stderr file, please check out. Two possible cases are as follows:
* forget to change the trial command `python3` into `python` in each experiment yaml.
* forget to install experiment dependencies such as tensorflow, keras and so on.
### Support tuner on Windows
* SMAC is not supported
* BOHB is supported, make sure C++ 14.0 compiler and dependencies installed successfully.
Note:
* If there is any error like `Segmentation fault`, please refer to [FAQ](FAQ.md)
authorName: default
experimentName: example_mnist
trialConcurrency: 1
maxExecDuration: 1h
maxTrialNum: 10
#choice: local, remote, pai
trainingServicePlatform: local
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
tuner:
#choice: TPE, Random, Anneal, Evolution, BatchTuner, MetisTuner
#SMAC (SMAC should be installed through nnictl)
builtinTunerName: TPE
classArgs:
#choice: maximize, minimize
optimize_mode: maximize
trial:
command: python mnist.py
codeDir: .
gpuNum: 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment