WindowsLocalMode.md 2.79 KB
Newer Older
1
# Windows Local Mode (experimental feature)
Chi Song's avatar
Chi Song committed
2

3
4
5
6
7
8
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.**  

Chi Song's avatar
Chi Song committed
9
10
When you use PowerShell to run script for the first time, you need **run PowerShell as administrator** with this command:

11
12
13
14
15
16
17
```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```

* __Install NNI through pip__

  Prerequisite: `python(64-bit) >= 3.5`
Chi Song's avatar
Chi Song committed
18

19
20
21
22
23
24
25
  ```bash
  python -m pip install --upgrade nni
  ```

* __Install NNI through source code__

  Prerequisite: `python >=3.5`, `git`, `powershell`
Chi Song's avatar
Chi Song committed
26

27
28
29
30
31
32
  ```bash
  git clone -b v0.7 https://github.com/Microsoft/nni.git
  cd nni
  powershell ./install.ps1
  ```

Chi Song's avatar
Chi Song committed
33
When these things are done, use the **config_windows.yml** configuration to start an experiment for validation.
34
35

```bash
Chi Song's avatar
Chi Song committed
36
nnictl create --config nni/examples/trials/mnist/config_windows.yml
37
38
```

Chi Song's avatar
Chi Song committed
39
40
41
42
43
For other examples you need to change trial command `python3` into `python` in each example YAML.

## **FAQ**

### simplejson failed when installing NNI
44
45

Make sure C++ 14.0 compiler installed.
Chi Song's avatar
Chi Song committed
46
47
48
49
50
>building '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:
51
52
53
54

```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```
Chi Song's avatar
Chi Song committed
55

56
57
>...cannot be loaded because running scripts is disabled on this system.

Chi Song's avatar
Chi Song committed
58
59
60
### 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 products above or Anaconda python(64-bit).
61
62
63
>ImportError: DLL load failed

### Trial failed on webUI
Chi Song's avatar
Chi Song committed
64
65
66

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:

67
68
69
```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```
Chi Song's avatar
Chi Song committed
70

71
If there is a stderr file, please check out. Two possible cases are as follows:
Chi Song's avatar
Chi Song committed
72
73
74

* 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.
75
76

### Support tuner on Windows
Chi Song's avatar
Chi Song committed
77

78
79
80
81
82
83
* 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)