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
d6febf29
Commit
d6febf29
authored
Jun 25, 2019
by
suiguoxin
Browse files
Merge branch 'master' of
git://github.com/microsoft/nni
parents
77c95479
c2179921
Changes
90
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
188 additions
and
28 deletions
+188
-28
src/webui/src/static/interface.ts
src/webui/src/static/interface.ts
+11
-5
src/webui/src/static/style/compare.scss
src/webui/src/static/style/compare.scss
+19
-0
src/webui/src/static/style/search.scss
src/webui/src/static/style/search.scss
+14
-1
src/webui/src/static/style/slideBar.scss
src/webui/src/static/style/slideBar.scss
+18
-7
src/webui/src/static/style/table.scss
src/webui/src/static/style/table.scss
+5
-0
test/async_sharing_test/simple_tuner.py
test/async_sharing_test/simple_tuner.py
+2
-2
test/config_test/multi_phase/multi_phase.test.yml
test/config_test/multi_phase/multi_phase.test.yml
+3
-3
test/config_test/multi_phase/multi_phase_batch.test.yml
test/config_test/multi_phase/multi_phase_batch.test.yml
+20
-0
test/config_test/multi_phase/multi_phase_evolution.test.yml
test/config_test/multi_phase/multi_phase_evolution.test.yml
+22
-0
test/config_test/multi_phase/multi_phase_grid.test.yml
test/config_test/multi_phase/multi_phase_grid.test.yml
+20
-0
test/config_test/multi_phase/multi_phase_metis.test.yml
test/config_test/multi_phase/multi_phase_metis.test.yml
+22
-0
test/config_test/multi_phase/multi_phase_tpe.test.yml
test/config_test/multi_phase/multi_phase_tpe.test.yml
+22
-0
test/config_test/multi_thread/multi_thread_tuner.py
test/config_test/multi_thread/multi_thread_tuner.py
+2
-2
test/naive_test/naive_tuner.py
test/naive_test/naive_tuner.py
+2
-2
test/pipelines-it-local-windows.yml
test/pipelines-it-local-windows.yml
+1
-1
test/pipelines-it-local.yml
test/pipelines-it-local.yml
+1
-1
test/pipelines-it-pai-windows.yml
test/pipelines-it-pai-windows.yml
+1
-1
test/pipelines-it-pai.yml
test/pipelines-it-pai.yml
+1
-1
test/pipelines-it-remote-windows.yml
test/pipelines-it-remote-windows.yml
+1
-1
test/pipelines-it-remote.yml
test/pipelines-it-remote.yml
+1
-1
No files found.
src/webui/src/static/interface.ts
View file @
d6febf29
...
...
@@ -97,6 +97,7 @@ interface Dimobj {
axisTick
?:
object
;
axisLabel
?:
object
;
axisLine
?:
object
;
nameTextStyle
?:
object
;
}
interface
ParaObj
{
...
...
@@ -108,10 +109,15 @@ interface FinalResult {
data
:
string
;
}
interface
Intermedia
{
name
:
string
;
// id
type
:
string
;
data
:
Array
<
number
|
object
>
;
// intermediate data
hyperPara
:
object
;
// each trial hyperpara value
}
export
{
TableObj
,
Parameters
,
Experiment
,
AccurPoint
,
TrialNumber
,
TrialJob
,
DetailAccurPoint
,
TooltipForAccuracy
,
ParaObj
,
Dimobj
,
FinalResult
,
FinalType
,
TooltipForIntermediate
,
SearchSpace
TableObj
,
Parameters
,
Experiment
,
AccurPoint
,
TrialNumber
,
TrialJob
,
DetailAccurPoint
,
TooltipForAccuracy
,
ParaObj
,
Dimobj
,
FinalResult
,
FinalType
,
TooltipForIntermediate
,
SearchSpace
,
Intermedia
};
src/webui/src/static/style/compare.scss
0 → 100644
View file @
d6febf29
.compare
{
width
:
92%
;
margin
:
0
auto
;
color
:
#333
;
tr
{
line-height
:
30px
;
border-bottom
:
1px
solid
#ccc
;
}
.column
{
width
:
124px
;
padding-left
:
18px
;
font-weight
:
700
;
}
.value
{
width
:
152px
;
padding-right
:
18px
;
text-align
:
right
;
}
}
src/webui/src/static/style/search.scss
View file @
d6febf29
/* some buttons
about
trial-detail table */
/* some buttons
in
trial-detail table */
.allList
{
width
:
96%
;
margin
:
0
auto
;
...
...
@@ -31,4 +31,17 @@
}
}
Button
.mediateBtn
{
margin
:
0
32px
;
}
/* each row's Intermediate btn -> Modal*/
.selectKeys
{
/* intermediate result is dict, select box for keys */
.select
{
width
:
120px
;
float
:
right
;
margin-right
:
10%
;
}
}
src/webui/src/static/style/slideBar.scss
View file @
d6febf29
...
...
@@ -99,22 +99,29 @@ $drowHoverBgColor: #e2e2e2;
padding
:
0
;
background-color
:
$drowBgColor
;
border-radius
:
0
;
.ant-dropdown-menu-item
:hover
{
.ant-dropdown-menu-item
{
font-size
:
16px
;
}
.ant-dropdown-menu-item
:hover
,
.ant-dropdown-menu-submenu
:hover
{
background-color
:
$drowHoverBgColor
;
}
}
}
.ant-dropdown-menu-sub
{
padding
:
0
;
background-color
:
$drowBgColor
;
border-radius
:
0
;
.ant-dropdown-menu-item
:hover
{
background-color
:
$drowHoverBgColor
;
}
}
/* nav style*/
.little
{
width
:
100%
;
.menu
{
.show
{
display
:
block
;
}
.hide
{
display
:
none
;
}
.more
{
color
:
#fff
;
font-size
:
24px
;
...
...
@@ -128,3 +135,7 @@ $drowHoverBgColor: #e2e2e2;
text-align
:
center
;
}
}
.menuModal
{
width
:
180px
;
}
src/webui/src/static/style/table.scss
View file @
d6febf29
...
...
@@ -102,3 +102,8 @@
.ant-modal-title
{
font-size
:
20px
;
}
/*disable select all checkbox in detail page*/
.ant-table-selection
{
display
:
none
;
}
test/async_sharing_test/simple_tuner.py
View file @
d6febf29
...
...
@@ -22,7 +22,7 @@ class SimpleTuner(Tuner):
self
.
sig_event
=
Event
()
self
.
thread_lock
=
Lock
()
def
generate_parameters
(
self
,
parameter_id
):
def
generate_parameters
(
self
,
parameter_id
,
**
kwargs
):
if
self
.
f_id
is
None
:
self
.
thread_lock
.
acquire
()
self
.
f_id
=
parameter_id
...
...
@@ -50,7 +50,7 @@ class SimpleTuner(Tuner):
self
.
thread_lock
.
release
()
return
self
.
trial_meta
[
parameter_id
]
def
receive_trial_result
(
self
,
parameter_id
,
parameters
,
reward
):
def
receive_trial_result
(
self
,
parameter_id
,
parameters
,
reward
,
**
kwargs
):
self
.
thread_lock
.
acquire
()
if
parameter_id
==
self
.
f_id
:
self
.
trial_meta
[
parameter_id
][
'checksum'
]
=
reward
[
'checksum'
]
...
...
test/config_test/multi_phase/multi_phase.test.yml
View file @
d6febf29
...
...
@@ -6,9 +6,9 @@ trialConcurrency: 4
searchSpacePath
:
./search_space.json
tuner
:
codeDir
:
../../../src/sdk/pynni/tests
class
FileName
:
test_multi_phase_tuner.py
className
:
NaiveMultiPhaseTuner
builtinTunerName
:
TPE
class
Args
:
optimize_mode
:
maximize
trial
:
codeDir
:
.
...
...
test/config_test/multi_phase/multi_phase_batch.test.yml
0 → 100644
View file @
d6febf29
authorName
:
nni
experimentName
:
default_test
maxExecDuration
:
5m
maxTrialNum
:
8
trialConcurrency
:
4
searchSpacePath
:
./search_space.json
tuner
:
builtinTunerName
:
BatchTuner
trial
:
codeDir
:
.
command
:
python3 multi_phase.py
gpuNum
:
0
useAnnotation
:
false
multiPhase
:
true
multiThread
:
false
trainingServicePlatform
:
local
test/config_test/multi_phase/multi_phase_evolution.test.yml
0 → 100644
View file @
d6febf29
authorName
:
nni
experimentName
:
default_test
maxExecDuration
:
5m
maxTrialNum
:
8
trialConcurrency
:
4
searchSpacePath
:
./search_space.json
tuner
:
builtinTunerName
:
Evolution
classArgs
:
optimize_mode
:
maximize
trial
:
codeDir
:
.
command
:
python3 multi_phase.py
gpuNum
:
0
useAnnotation
:
false
multiPhase
:
true
multiThread
:
false
trainingServicePlatform
:
local
test/config_test/multi_phase/multi_phase_grid.test.yml
0 → 100644
View file @
d6febf29
authorName
:
nni
experimentName
:
default_test
maxExecDuration
:
5m
maxTrialNum
:
8
trialConcurrency
:
4
searchSpacePath
:
./search_space.json
tuner
:
builtinTunerName
:
GridSearch
trial
:
codeDir
:
.
command
:
python3 multi_phase.py
gpuNum
:
0
useAnnotation
:
false
multiPhase
:
true
multiThread
:
false
trainingServicePlatform
:
local
test/config_test/multi_phase/multi_phase_metis.test.yml
0 → 100644
View file @
d6febf29
authorName
:
nni
experimentName
:
default_test
maxExecDuration
:
5m
maxTrialNum
:
8
trialConcurrency
:
4
searchSpacePath
:
./search_space.json
tuner
:
builtinTunerName
:
MetisTuner
classArgs
:
optimize_mode
:
maximize
trial
:
codeDir
:
.
command
:
python3 multi_phase.py
gpuNum
:
0
useAnnotation
:
false
multiPhase
:
true
multiThread
:
false
trainingServicePlatform
:
local
test/config_test/multi_phase/multi_phase_tpe.test.yml
0 → 100644
View file @
d6febf29
authorName
:
nni
experimentName
:
default_test
maxExecDuration
:
5m
maxTrialNum
:
8
trialConcurrency
:
4
searchSpacePath
:
./search_space.json
tuner
:
builtinTunerName
:
TPE
classArgs
:
optimize_mode
:
maximize
trial
:
codeDir
:
.
command
:
python3 multi_phase.py
gpuNum
:
0
useAnnotation
:
false
multiPhase
:
true
multiThread
:
false
trainingServicePlatform
:
local
test/config_test/multi_thread/multi_thread_tuner.py
View file @
d6febf29
...
...
@@ -6,7 +6,7 @@ class MultiThreadTuner(Tuner):
def
__init__
(
self
):
self
.
parent_done
=
False
def
generate_parameters
(
self
,
parameter_id
):
def
generate_parameters
(
self
,
parameter_id
,
**
kwargs
):
if
parameter_id
==
0
:
return
{
'x'
:
0
}
else
:
...
...
@@ -14,7 +14,7 @@ class MultiThreadTuner(Tuner):
time
.
sleep
(
2
)
return
{
'x'
:
1
}
def
receive_trial_result
(
self
,
parameter_id
,
parameters
,
value
):
def
receive_trial_result
(
self
,
parameter_id
,
parameters
,
value
,
**
kwargs
):
if
parameter_id
==
0
:
self
.
parent_done
=
True
...
...
test/naive_test/naive_tuner.py
View file @
d6febf29
...
...
@@ -16,12 +16,12 @@ class NaiveTuner(Tuner):
self
.
cur
=
0
_logger
.
info
(
'init'
)
def
generate_parameters
(
self
,
parameter_id
):
def
generate_parameters
(
self
,
parameter_id
,
**
kwargs
):
self
.
cur
+=
1
_logger
.
info
(
'generate parameters: %s'
%
self
.
cur
)
return
{
'x'
:
self
.
cur
}
def
receive_trial_result
(
self
,
parameter_id
,
parameters
,
value
):
def
receive_trial_result
(
self
,
parameter_id
,
parameters
,
value
,
**
kwargs
):
reward
=
extract_scalar_reward
(
value
)
_logger
.
info
(
'receive trial result: %s, %s, %s'
%
(
parameter_id
,
parameters
,
reward
))
_result
.
write
(
'%d %d
\n
'
%
(
parameters
[
'x'
],
reward
))
...
...
test/pipelines-it-local-windows.yml
View file @
d6febf29
...
...
@@ -18,7 +18,7 @@ jobs:
displayName
:
'
generate
config
files'
-
script
:
|
cd test
python config_test.py --ts local --local_gpu --exclude smac,bohb
python config_test.py --ts local --local_gpu --exclude smac,bohb
,multi_phase_batch,multi_phase_grid
displayName
:
'
Examples
and
advanced
features
tests
on
local
machine'
-
script
:
|
cd test
...
...
test/pipelines-it-local.yml
View file @
d6febf29
...
...
@@ -31,7 +31,7 @@ jobs:
displayName
:
'
Built-in
tuners
/
assessors
tests'
-
script
:
|
cd test
PATH=$HOME/.local/bin:$PATH python3 config_test.py --ts local --local_gpu
PATH=$HOME/.local/bin:$PATH python3 config_test.py --ts local --local_gpu
--exclude multi_phase_batch,multi_phase_grid
displayName
:
'
Examples
and
advanced
features
tests
on
local
machine'
-
script
:
|
cd test
...
...
test/pipelines-it-pai-windows.yml
View file @
d6febf29
...
...
@@ -65,5 +65,5 @@ jobs:
python --version
python generate_ts_config.py --ts pai --pai_host $(pai_host) --pai_user $(pai_user) --pai_pwd $(pai_pwd) --vc $(pai_virtual_cluster) --nni_docker_image $(docker_image) --data_dir $(data_dir) --output_dir $(output_dir) --nni_manager_ip $(nni_manager_ip)
python config_test.py --ts pai --exclude multi_phase,smac,bohb
python config_test.py --ts pai --exclude multi_phase,smac,bohb
,multi_phase_batch,multi_phase_grid
displayName
:
'
Examples
and
advanced
features
tests
on
pai'
\ No newline at end of file
test/pipelines-it-pai.yml
View file @
d6febf29
...
...
@@ -75,5 +75,5 @@ jobs:
python3 generate_ts_config.py --ts pai --pai_host $(pai_host) --pai_user $(pai_user) --pai_pwd $(pai_pwd) --vc $(pai_virtual_cluster) \
--nni_docker_image $TEST_IMG --data_dir $(data_dir) --output_dir $(output_dir) --nni_manager_ip $(nni_manager_ip)
PATH=$HOME/.local/bin:$PATH python3 config_test.py --ts pai --exclude multi_phase
PATH=$HOME/.local/bin:$PATH python3 config_test.py --ts pai --exclude multi_phase
_batch,multi_phase_grid
displayName
:
'
integration
test'
test/pipelines-it-remote-windows.yml
View file @
d6febf29
...
...
@@ -39,7 +39,7 @@ jobs:
cd test
python generate_ts_config.py --ts remote --remote_user $(docker_user) --remote_host $(remote_host) --remote_port $(Get-Content port) --remote_pwd $(docker_pwd) --nni_manager_ip $(nni_manager_ip)
Get-Content training_service.yml
python config_test.py --ts remote --exclude cifar10,smac,bohb
python config_test.py --ts remote --exclude cifar10,smac,bohb
,multi_phase_batch,multi_phase_grid
displayName
:
'
integration
test'
-
task
:
SSH@0
inputs
:
...
...
test/pipelines-it-remote.yml
View file @
d6febf29
...
...
@@ -52,7 +52,7 @@ jobs:
python3 generate_ts_config.py --ts remote --remote_user $(docker_user) --remote_host $(remote_host) \
--remote_port $(cat port) --remote_pwd $(docker_pwd) --nni_manager_ip $(nni_manager_ip)
cat training_service.yml
PATH=$HOME/.local/bin:$PATH python3 config_test.py --ts remote --exclude cifar10
PATH=$HOME/.local/bin:$PATH python3 config_test.py --ts remote --exclude cifar10
,multi_phase_batch,multi_phase_grid
displayName
:
'
integration
test'
-
task
:
SSH@0
inputs
:
...
...
Prev
1
2
3
4
5
Next
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