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
c1bda85e
Commit
c1bda85e
authored
Sep 12, 2018
by
Crysple
Committed by
QuanluZhang
Sep 13, 2018
Browse files
support install from venv and travis CI
parent
1208833d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
Makefile
Makefile
+5
-3
src/nni_manager/common/utils.ts
src/nni_manager/common/utils.ts
+4
-0
test/naive/run.py
test/naive/run.py
+1
-0
No files found.
Makefile
View file @
c1bda85e
BIN_PATH
?=
${HOME}
/.local/bin
BIN_PATH
?=
${HOME}
/.local/bin
INSTALL_PREFIX
?=
${HOME}
/.local
INSTALL_PREFIX
?=
${HOME}
/.local
PIP_MODE
?=
--user
EXAMPLES_PATH
?=
${HOME}
/nni/examples
EXAMPLES_PATH
?=
${HOME}
/nni/examples
WHOAMI
:=
$(
shell
whoami
)
WHOAMI
:=
$(
shell
whoami
)
.PHONY
:
build install uninstall dev-install
YARN
:=
$(INSTALL_PREFIX)
/yarn/bin/yarn
YARN
:=
$(INSTALL_PREFIX)
/yarn/bin/yarn
ifndef
TRAVIS
PIP_MODE
?=
--user
endif
.PHONY
:
build install uninstall dev-install
build
:
build
:
### Building NNI Manager ###
### Building NNI Manager ###
...
@@ -63,7 +65,7 @@ install:
...
@@ -63,7 +65,7 @@ install:
pip-install
:
pip-install
:
ifneq
('$(HOME)', '/root')
ifneq
('$(HOME)', '/root')
ifeq
(${WHOAMI}, root)
ifeq
(${WHOAMI}, root)
### Sorry, sudo
make
install is not supported ###
### Sorry, sudo
pip
install is not supported ###
exit
1
exit
1
endif
endif
endif
endif
...
...
src/nni_manager/common/utils.ts
View file @
c1bda85e
...
@@ -154,6 +154,10 @@ function parseArg(names: string[]): string {
...
@@ -154,6 +154,10 @@ function parseArg(names: string[]): string {
function
getMsgDispatcherCommand
(
tuner
:
any
,
assessor
:
any
):
string
{
function
getMsgDispatcherCommand
(
tuner
:
any
,
assessor
:
any
):
string
{
let
command
:
string
=
`python3 -m nni --tuner_class_name
${
tuner
.
className
}
`
;
let
command
:
string
=
`python3 -m nni --tuner_class_name
${
tuner
.
className
}
`
;
if
(
process
.
env
.
VIRTUAL_ENV
)
{
command
=
path
.
join
(
process
.
env
.
VIRTUAL_ENV
,
'
bin/
'
)
+
command
;
}
if
(
tuner
.
classArgs
!==
undefined
)
{
if
(
tuner
.
classArgs
!==
undefined
)
{
command
+=
` --tuner_args
${
JSON
.
stringify
(
JSON
.
stringify
(
tuner
.
classArgs
))}
`
;
command
+=
` --tuner_args
${
JSON
.
stringify
(
JSON
.
stringify
(
tuner
.
classArgs
))}
`
;
}
}
...
...
test/naive/run.py
View file @
c1bda85e
...
@@ -80,5 +80,6 @@ if __name__ == '__main__':
...
@@ -80,5 +80,6 @@ if __name__ == '__main__':
print
(
RED
+
'FAIL'
+
CLEAR
)
print
(
RED
+
'FAIL'
+
CLEAR
)
print
(
'%r'
%
e
)
print
(
'%r'
%
e
)
traceback
.
print_exc
()
traceback
.
print_exc
()
raise
e
subprocess
.
run
([
'nnictl'
,
'stop'
])
subprocess
.
run
([
'nnictl'
,
'stop'
])
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