"src/include/threadwise_direct_convolution.hpp" did not exist on "6790b8f3cc4fd32a9d9a43c6c9d80b826d969980"
Commit b3a6ff8b authored by demianzhang's avatar demianzhang Committed by xuehui
Browse files

Remove PowerShell execution policy (#1175)

* remove check powershell policy

* remove policy dependency

* update
parent c1a5b1ee
...@@ -155,7 +155,7 @@ Windows ...@@ -155,7 +155,7 @@ Windows
```bash ```bash
git clone -b v0.8 https://github.com/Microsoft/nni.git git clone -b v0.8 https://github.com/Microsoft/nni.git
cd nni cd nni
powershell .\install.ps1 powershell -ExecutionPolicy Bypass -file install.ps1
``` ```
For the system requirements of NNI, please refer to [Install NNI](docs/en_US/Installation.md) For the system requirements of NNI, please refer to [Install NNI](docs/en_US/Installation.md)
......
...@@ -28,12 +28,6 @@ Currently we support installation on Linux, Mac and Windows(local, remote and pa ...@@ -28,12 +28,6 @@ Currently we support installation on Linux, Mac and Windows(local, remote and pa
## **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:
```powershell
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```
Anaconda or Miniconda is highly recommended. Anaconda or Miniconda is highly recommended.
* __Install NNI through pip__ * __Install NNI through pip__
...@@ -47,13 +41,11 @@ Set-ExecutionPolicy -ExecutionPolicy Unrestricted ...@@ -47,13 +41,11 @@ Set-ExecutionPolicy -ExecutionPolicy Unrestricted
* __Install NNI through source code__ * __Install NNI through source code__
Prerequisite: `python >=3.5`, `git`, `PowerShell`. Prerequisite: `python >=3.5`, `git`, `PowerShell`.
you can install NNI as administrator or current user as follows:
```bash ```bash
git clone -b v0.8 https://github.com/Microsoft/nni.git git clone -b v0.8 https://github.com/Microsoft/nni.git
cd nni cd nni
powershell .\install.ps1 powershell -ExecutionPolicy Bypass -file install.ps1
``` ```
## **System requirements** ## **System requirements**
......
...@@ -10,11 +10,7 @@ We support Linux MacOS and Windows in current stage, Ubuntu 16.04 or higher, Mac ...@@ -10,11 +10,7 @@ We support Linux MacOS and Windows in current stage, Ubuntu 16.04 or higher, Mac
``` ```
#### Windows #### Windows
If you are using NNI on Windows, you need run below PowerShell command as administrator at first time.
```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```
Then install nni through pip:
```bash ```bash
python -m pip install --upgrade nni python -m pip install --upgrade nni
``` ```
......
...@@ -102,7 +102,7 @@ export async function execNewFile(filename: string): Promise<void> { ...@@ -102,7 +102,7 @@ export async function execNewFile(filename: string): Promise<void> {
*/ */
export function execScript(filePath: string): cp.ChildProcess { export function execScript(filePath: string): cp.ChildProcess {
if (process.platform === 'win32') { if (process.platform === 'win32') {
return cp.exec(`powershell.exe -file ${filePath}`); return cp.exec(`powershell.exe -ExecutionPolicy Bypass -file ${filePath}`);
} else { } else {
return cp.exec(`bash ${filePath}`); return cp.exec(`bash ${filePath}`);
} }
......
...@@ -346,13 +346,6 @@ def set_experiment(experiment_config, mode, port, config_file_name): ...@@ -346,13 +346,6 @@ def set_experiment(experiment_config, mode, port, config_file_name):
def launch_experiment(args, experiment_config, mode, config_file_name, experiment_id=None): def launch_experiment(args, experiment_config, mode, config_file_name, experiment_id=None):
'''follow steps to start rest server and start experiment''' '''follow steps to start rest server and start experiment'''
nni_config = Config(config_file_name) nni_config = Config(config_file_name)
# check execution policy in powershell
if sys.platform == 'win32':
execution_policy = check_output(['powershell.exe','Get-ExecutionPolicy']).decode('ascii').strip()
if execution_policy == 'Restricted':
print_error('PowerShell execution policy error, please run PowerShell as administrator with this command first:\r\n'\
+ '\'Set-ExecutionPolicy -ExecutionPolicy Unrestricted\'')
exit(1)
# check packages for tuner # check packages for tuner
package_name, module_name = None, None package_name, module_name = None, None
if experiment_config.get('tuner') and experiment_config['tuner'].get('builtinTunerName'): if experiment_config.get('tuner') and experiment_config['tuner'].get('builtinTunerName'):
......
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