Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
b3a6ff8b
Commit
b3a6ff8b
authored
Jun 17, 2019
by
demianzhang
Committed by
xuehui
Jun 17, 2019
Browse files
Remove PowerShell execution policy (#1175)
* remove check powershell policy * remove policy dependency * update
parent
c1a5b1ee
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
23 deletions
+4
-23
README.md
README.md
+1
-1
docs/en_US/Installation.md
docs/en_US/Installation.md
+1
-9
docs/en_US/QuickStart.md
docs/en_US/QuickStart.md
+1
-5
src/nni_manager/training_service/common/util.ts
src/nni_manager/training_service/common/util.ts
+1
-1
tools/nni_cmd/launcher.py
tools/nni_cmd/launcher.py
+0
-7
No files found.
README.md
View file @
b3a6ff8b
...
...
@@ -155,7 +155,7 @@ Windows
```
bash
git clone
-b
v0.8 https://github.com/Microsoft/nni.git
cd
nni
powershell
.
\
i
nstall.ps1
powershell
-ExecutionPolicy
Bypass
-file
install.ps1
```
For the system requirements of NNI, please refer to
[
Install NNI
](
docs/en_US/Installation.md
)
...
...
docs/en_US/Installation.md
View file @
b3a6ff8b
...
...
@@ -28,12 +28,6 @@ Currently we support installation on Linux, Mac and Windows(local, remote and pa
## **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.
*
__Install NNI through pip__
...
...
@@ -47,13 +41,11 @@ Set-ExecutionPolicy -ExecutionPolicy Unrestricted
*
__Install NNI through source code__
Prerequisite:
`python >=3.5`
,
`git`
,
`PowerShell`
.
you can install NNI as administrator or current user as follows:
```
bash
git clone
-b
v0.8 https://github.com/Microsoft/nni.git
cd
nni
powershell
.
\
i
nstall.ps1
powershell
-ExecutionPolicy
Bypass
-file
install.ps1
```
## **System requirements**
...
...
docs/en_US/QuickStart.md
View file @
b3a6ff8b
...
...
@@ -10,11 +10,7 @@ We support Linux MacOS and Windows in current stage, Ubuntu 16.04 or higher, Mac
```
#### 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
python
-m
pip
install
--upgrade
nni
```
...
...
src/nni_manager/training_service/common/util.ts
View file @
b3a6ff8b
...
...
@@ -102,7 +102,7 @@ export async function execNewFile(filename: string): Promise<void> {
*/
export
function
execScript
(
filePath
:
string
):
cp
.
ChildProcess
{
if
(
process
.
platform
===
'
win32
'
)
{
return
cp
.
exec
(
`powershell.exe -file
${
filePath
}
`
);
return
cp
.
exec
(
`powershell.exe
-ExecutionPolicy Bypass
-file
${
filePath
}
`
);
}
else
{
return
cp
.
exec
(
`bash
${
filePath
}
`
);
}
...
...
tools/nni_cmd/launcher.py
View file @
b3a6ff8b
...
...
@@ -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
):
'''follow steps to start rest server and start experiment'''
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
package_name
,
module_name
=
None
,
None
if
experiment_config
.
get
(
'tuner'
)
and
experiment_config
[
'tuner'
].
get
(
'builtinTunerName'
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment