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
e9040c9b
Unverified
Commit
e9040c9b
authored
Jul 03, 2019
by
chicm-ms
Committed by
GitHub
Jul 03, 2019
Browse files
Merge pull request #23 from microsoft/master
pull code
parents
256f27af
ed63175c
Changes
108
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
284 additions
and
166 deletions
+284
-166
src/sdk/pynni/nni/smartparam.py
src/sdk/pynni/nni/smartparam.py
+35
-8
src/sdk/pynni/tests/test_smartparam.py
src/sdk/pynni/tests/test_smartparam.py
+16
-1
src/webui/src/components/Modal/Compare.tsx
src/webui/src/components/Modal/Compare.tsx
+2
-1
src/webui/src/components/Overview.tsx
src/webui/src/components/Overview.tsx
+4
-2
src/webui/src/components/SlideBar.tsx
src/webui/src/components/SlideBar.tsx
+96
-93
src/webui/src/components/TrialsDetail.tsx
src/webui/src/components/TrialsDetail.tsx
+2
-4
src/webui/src/components/trial-detail/Duration.tsx
src/webui/src/components/trial-detail/Duration.tsx
+9
-8
src/webui/src/components/trial-detail/Intermeidate.tsx
src/webui/src/components/trial-detail/Intermeidate.tsx
+20
-17
src/webui/src/static/style/compare.scss
src/webui/src/static/style/compare.scss
+10
-4
src/webui/src/static/style/search.scss
src/webui/src/static/style/search.scss
+9
-1
src/webui/src/static/style/slideBar.scss
src/webui/src/static/style/slideBar.scss
+40
-19
test/config_test/tuners/mnist-gp.test.yml
test/config_test/tuners/mnist-gp.test.yml
+33
-0
test/naive_test/README_zh_CN.md
test/naive_test/README_zh_CN.md
+1
-1
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
tools/nni_annotation/README_zh_CN.md
tools/nni_annotation/README_zh_CN.md
+1
-1
No files found.
src/sdk/pynni/nni/smartparam.py
View file @
e9040c9b
...
...
@@ -23,6 +23,7 @@ import random
from
.env_vars
import
trial_env_vars
from
.
import
trial
from
.nas_utils
import
classic_mode
,
enas_mode
,
oneshot_mode
__all__
=
[
...
...
@@ -124,7 +125,9 @@ else:
funcs_args
,
fixed_inputs
,
optional_inputs
,
optional_input_size
):
optional_input_size
,
mode
=
'classic_mode'
,
tf
=
None
):
'''execute the chosen function and inputs.
Below is an example of chosen function and inputs:
{
...
...
@@ -144,14 +147,38 @@ else:
fixed_inputs:
optional_inputs: dict of optional inputs
optional_input_size: number of candidate inputs to be chosen
tf: tensorflow module
'''
mutable_block
=
_get_param
(
mutable_id
)
chosen_layer
=
mutable_block
[
mutable_layer_id
][
"chosen_layer"
]
chosen_inputs
=
mutable_block
[
mutable_layer_id
][
"chosen_inputs"
]
real_chosen_inputs
=
[
optional_inputs
[
input_name
]
for
input_name
in
chosen_inputs
]
layer_out
=
funcs
[
chosen_layer
]([
fixed_inputs
,
real_chosen_inputs
],
**
funcs_args
[
chosen_layer
])
return
layer_out
if
mode
==
'classic_mode'
:
return
classic_mode
(
mutable_id
,
mutable_layer_id
,
funcs
,
funcs_args
,
fixed_inputs
,
optional_inputs
,
optional_input_size
)
elif
mode
==
'enas_mode'
:
assert
tf
is
not
None
,
'Internal Error: Tensorflow should not be None in enas_mode'
return
enas_mode
(
mutable_id
,
mutable_layer_id
,
funcs
,
funcs_args
,
fixed_inputs
,
optional_inputs
,
optional_input_size
,
tf
)
elif
mode
==
'oneshot_mode'
:
assert
tf
is
not
None
,
'Internal Error: Tensorflow should not be None in oneshot_mode'
return
oneshot_mode
(
mutable_id
,
mutable_layer_id
,
funcs
,
funcs_args
,
fixed_inputs
,
optional_inputs
,
optional_input_size
,
tf
)
else
:
raise
RuntimeError
(
'Unrecognized mode: %s'
%
mode
)
def
_get_param
(
key
):
if
trial
.
_params
is
None
:
...
...
src/sdk/pynni/tests/test_smartparam.py
View file @
e9040c9b
...
...
@@ -38,7 +38,13 @@ class SmartParamTestCase(TestCase):
'test_smartparam/choice3/choice'
:
'[1, 2]'
,
'test_smartparam/choice4/choice'
:
'{"a", 2}'
,
'test_smartparam/func/function_choice'
:
'bar'
,
'test_smartparam/lambda_func/function_choice'
:
"lambda: 2*3"
'test_smartparam/lambda_func/function_choice'
:
"lambda: 2*3"
,
'mutable_block_66'
:{
'mutable_layer_0'
:{
'chosen_layer'
:
'conv2D(size=5)'
,
'chosen_inputs'
:
[
'y'
]
}
}
}
nni
.
trial
.
_params
=
{
'parameter_id'
:
'test_trial'
,
'parameters'
:
params
}
...
...
@@ -61,6 +67,13 @@ class SmartParamTestCase(TestCase):
val
=
nni
.
function_choice
({
"lambda: 2*3"
:
lambda
:
2
*
3
,
"lambda: 3*4"
:
lambda
:
3
*
4
},
name
=
'lambda_func'
,
key
=
'test_smartparam/lambda_func/function_choice'
)
self
.
assertEqual
(
val
,
6
)
def
test_mutable_layer
(
self
):
layer_out
=
nni
.
mutable_layer
(
'mutable_block_66'
,
'mutable_layer_0'
,
{
'conv2D(size=3)'
:
conv2D
,
'conv2D(size=5)'
:
conv2D
},
{
'conv2D(size=3)'
:
{
'size'
:
3
},
'conv2D(size=5)'
:
{
'size'
:
5
}},
[
100
],
{
'x'
:
1
,
'y'
:
2
},
1
,
'classic_mode'
)
self
.
assertEqual
(
layer_out
,
[
100
,
2
,
5
])
def
foo
():
return
'foo'
...
...
@@ -68,6 +81,8 @@ def foo():
def
bar
():
return
'bar'
def
conv2D
(
inputs
,
size
=
3
):
return
inputs
[
0
]
+
inputs
[
1
]
+
[
size
]
if
__name__
==
'__main__'
:
main
()
src/webui/src/components/Modal/Compare.tsx
View file @
e9040c9b
...
...
@@ -127,7 +127,7 @@ class Compare extends React.Component<CompareProps, {}> {
<
td
/>
{
Object
.
keys
(
idList
).
map
(
key
=>
{
return
(
<
td
className
=
"value"
key
=
{
key
}
>
{
idList
[
key
]
}
</
td
>
<
td
className
=
"value
idList
"
key
=
{
key
}
>
{
idList
[
key
]
}
</
td
>
);
})
}
</
tr
>
...
...
@@ -193,6 +193,7 @@ class Compare extends React.Component<CompareProps, {}> {
destroyOnClose
=
{
true
}
maskClosable
=
{
false
}
width
=
"90%"
// centered={true}
>
<
Row
>
{
this
.
intermediate
()
}
</
Row
>
<
Row
>
{
this
.
initColumn
()
}
</
Row
>
...
...
src/webui/src/components/Overview.tsx
View file @
e9040c9b
...
...
@@ -353,8 +353,10 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
const
indexarr
:
Array
<
number
>
=
[];
Object
.
keys
(
sourcePoint
).
map
(
item
=>
{
const
items
=
sourcePoint
[
item
];
accarr
.
push
(
items
.
acc
.
default
);
indexarr
.
push
(
items
.
sequenceId
);
if
(
items
.
acc
!==
undefined
)
{
accarr
.
push
(
items
.
acc
.
default
);
indexarr
.
push
(
items
.
sequenceId
);
}
});
const
accOption
=
{
// support max show 0.0000000
...
...
src/webui/src/components/SlideBar.tsx
View file @
e9040c9b
...
...
@@ -4,7 +4,7 @@ import axios from 'axios';
import
{
MANAGER_IP
}
from
'
../static/const
'
;
import
MediaQuery
from
'
react-responsive
'
;
import
{
DOWNLOAD_IP
}
from
'
../static/const
'
;
import
{
Row
,
Col
,
Menu
,
Dropdown
,
Icon
,
Select
}
from
'
antd
'
;
import
{
Row
,
Col
,
Menu
,
Dropdown
,
Icon
,
Select
,
Button
}
from
'
antd
'
;
const
{
SubMenu
}
=
Menu
;
const
{
Option
}
=
Select
;
import
'
../static/style/slideBar.scss
'
;
...
...
@@ -14,6 +14,7 @@ interface SliderState {
version
:
string
;
menuVisible
:
boolean
;
navBarVisible
:
boolean
;
isdisabledFresh
:
boolean
;
}
interface
SliderProps
{
...
...
@@ -29,7 +30,6 @@ class SlideBar extends React.Component<SliderProps, SliderState> {
public
_isMounted
=
false
;
public
divMenu
:
HTMLDivElement
|
null
;
public
countOfMenu
:
number
=
0
;
public
selectHTML
:
Select
|
null
;
constructor
(
props
:
SliderProps
)
{
...
...
@@ -38,6 +38,7 @@ class SlideBar extends React.Component<SliderProps, SliderState> {
version
:
''
,
menuVisible
:
false
,
navBarVisible
:
false
,
isdisabledFresh
:
false
};
}
...
...
@@ -208,7 +209,6 @@ class SlideBar extends React.Component<SliderProps, SliderState> {
}
menu
=
()
=>
{
this
.
countOfMenu
=
0
;
return
(
<
Menu
onClick
=
{
this
.
handleMenuClick
}
>
<
Menu
.
Item
key
=
"1"
>
Experiment Parameters
</
Menu
.
Item
>
...
...
@@ -223,12 +223,9 @@ class SlideBar extends React.Component<SliderProps, SliderState> {
const
{
version
}
=
this
.
state
;
const
feedBackLink
=
`https://github.com/Microsoft/nni/issues/new?labels=
${
version
}
`
;
return
(
<
Menu
onClick
=
{
this
.
handleMenuClick
}
mode
=
"inline
"
>
<
Menu
onClick
=
{
this
.
handleMenuClick
}
className
=
"menuModal
"
>
<
Menu
.
Item
key
=
"overview"
><
Link
to
=
{
'
/oview
'
}
>
Overview
</
Link
></
Menu
.
Item
>
<
Menu
.
Item
key
=
"detail"
><
Link
to
=
{
'
/detail
'
}
>
Trials detail
</
Link
></
Menu
.
Item
>
<
Menu
.
Item
key
=
"fresh"
>
<
span
className
=
"fresh"
onClick
=
{
this
.
fresh
}
><
span
>
Fresh
</
span
></
span
>
</
Menu
.
Item
>
<
Menu
.
Item
key
=
"feedback"
>
<
a
href
=
{
feedBackLink
}
target
=
"_blank"
>
Feedback
</
a
>
</
Menu
.
Item
>
...
...
@@ -250,38 +247,42 @@ class SlideBar extends React.Component<SliderProps, SliderState> {
);
}
// nav bar <1299
showMenu
=
()
=>
{
if
(
this
.
divMenu
!==
null
)
{
this
.
countOfMenu
=
this
.
countOfMenu
+
1
;
if
(
this
.
countOfMenu
%
2
===
0
)
{
this
.
divMenu
.
setAttribute
(
'
class
'
,
'
hide
'
);
}
else
{
this
.
divMenu
.
setAttribute
(
'
class
'
,
'
show
'
);
}
}
}
select
=
()
=>
{
const
{
isdisabledFresh
}
=
this
.
state
;
return
(
<
Select
onSelect
=
{
this
.
getInterval
}
defaultValue
=
"Refresh every 10s"
className
=
"interval"
>
<
Option
value
=
"close"
>
Disable Auto Refresh
</
Option
>
<
Option
value
=
"10"
>
Refresh every 10s
</
Option
>
<
Option
value
=
"20"
>
Refresh every 20s
</
Option
>
<
Option
value
=
"30"
>
Refresh every 30s
</
Option
>
<
Option
value
=
"60"
>
Refresh every 1min
</
Option
>
</
Select
>
<
div
className
=
"interval"
>
<
Button
className
=
"fresh"
onClick
=
{
this
.
fresh
}
type
=
"ghost"
disabled
=
{
isdisabledFresh
}
>
<
Icon
type
=
"sync"
/><
span
>
Refresh
</
span
>
</
Button
>
<
Select
onSelect
=
{
this
.
getInterval
}
defaultValue
=
"Refresh every 10s"
>
<
Option
value
=
"close"
>
Disable Auto Refresh
</
Option
>
<
Option
value
=
"10"
>
Refresh every 10s
</
Option
>
<
Option
value
=
"20"
>
Refresh every 20s
</
Option
>
<
Option
value
=
"30"
>
Refresh every 30s
</
Option
>
<
Option
value
=
"60"
>
Refresh every 1min
</
Option
>
</
Select
>
</
div
>
);
}
fresh
=
(
event
:
React
.
SyntheticEvent
<
EventTarget
>
)
=>
{
event
.
preventDefault
();
const
whichPage
=
window
.
location
.
pathname
;
this
.
props
.
changeFresh
(
whichPage
);
event
.
stopPropagation
();
if
(
this
.
_isMounted
)
{
this
.
setState
({
isdisabledFresh
:
true
},
()
=>
{
const
whichPage
=
window
.
location
.
pathname
;
this
.
props
.
changeFresh
(
whichPage
);
setTimeout
(()
=>
{
this
.
setState
(()
=>
({
isdisabledFresh
:
false
}));
},
1000
);
});
}
}
componentDidMount
()
{
...
...
@@ -298,73 +299,75 @@ class SlideBar extends React.Component<SliderProps, SliderState> {
const
feed
=
`https://github.com/Microsoft/nni/issues/new?labels=
${
version
}
`
;
return
(
<
Row
>
<
MediaQuery
query
=
"(min-width: 1299px)"
>
<
Row
className
=
"nav"
>
<
ul
className
=
"link"
>
<
li
className
=
"logo"
>
<
Col
span
=
{
18
}
>
<
MediaQuery
query
=
"(min-width: 1299px)"
>
<
Row
className
=
"nav"
>
<
ul
className
=
"link"
>
<
li
className
=
"logo"
>
<
Link
to
=
{
'
/oview
'
}
>
<
img
src
=
{
require
(
'
../static/img/logo2.png
'
)
}
style
=
{
{
width
:
88
}
}
alt
=
"NNI logo"
/>
</
Link
>
</
li
>
<
li
className
=
"tab firstTab"
>
<
Link
to
=
{
'
/oview
'
}
activeClassName
=
"high"
>
Overview
</
Link
>
</
li
>
<
li
className
=
"tab"
>
<
Link
to
=
{
'
/detail
'
}
activeClassName
=
"high"
>
Trials detail
</
Link
>
</
li
>
<
li
className
=
"feedback"
>
<
Dropdown
className
=
"dropdown"
overlay
=
{
this
.
menu
()
}
onVisibleChange
=
{
this
.
handleVisibleChange
}
visible
=
{
menuVisible
}
trigger
=
{
[
'
click
'
]
}
>
<
a
className
=
"ant-dropdown-link"
href
=
"#"
>
Download
<
Icon
type
=
"down"
/>
</
a
>
</
Dropdown
>
<
a
href
=
{
feed
}
target
=
"_blank"
>
<
img
src
=
{
require
(
'
../static/img/icon/issue.png
'
)
}
alt
=
"NNI github issue"
/>
Feedback
</
a
>
<
span
className
=
"version"
>
Version:
{
version
}
</
span
>
</
li
>
</
ul
>
</
Row
>
</
MediaQuery
>
</
Col
>
<
Col
span
=
{
18
}
>
<
MediaQuery
query
=
"(max-width: 1299px)"
>
<
Row
className
=
"little"
>
<
Col
span
=
{
1
}
className
=
"menu"
>
<
Dropdown
overlay
=
{
this
.
navigationBar
()
}
trigger
=
{
[
'
click
'
]
}
>
<
Icon
type
=
"unordered-list"
className
=
"more"
/>
</
Dropdown
>
</
Col
>
<
Col
span
=
{
14
}
className
=
"logo"
>
<
Link
to
=
{
'
/oview
'
}
>
<
img
src
=
{
require
(
'
../static/img/logo2.png
'
)
}
style
=
{
{
width
:
8
8
}
}
style
=
{
{
width
:
8
0
}
}
alt
=
"NNI logo"
/>
</
Link
>
</
li
>
<
li
className
=
"tab firstTab"
>
<
Link
to
=
{
'
/oview
'
}
activeClassName
=
"high"
>
Overview
</
Link
>
</
li
>
<
li
className
=
"tab"
>
<
Link
to
=
{
'
/detail
'
}
activeClassName
=
"high"
>
Trials detail
</
Link
>
</
li
>
<
li
className
=
"feedback"
>
<
span
className
=
"fresh"
onClick
=
{
this
.
fresh
}
>
<
Icon
type
=
"sync"
/><
span
>
Fresh
</
span
>
</
span
>
<
Dropdown
className
=
"dropdown"
overlay
=
{
this
.
menu
()
}
onVisibleChange
=
{
this
.
handleVisibleChange
}
visible
=
{
menuVisible
}
trigger
=
{
[
'
click
'
]
}
>
<
a
className
=
"ant-dropdown-link"
href
=
"#"
>
Download
<
Icon
type
=
"down"
/>
</
a
>
</
Dropdown
>
<
a
href
=
{
feed
}
target
=
"_blank"
>
<
img
src
=
{
require
(
'
../static/img/icon/issue.png
'
)
}
alt
=
"NNI github issue"
/>
Feedback
</
a
>
<
span
className
=
"version"
>
Version:
{
version
}
</
span
>
</
li
>
</
ul
>
</
Row
>
</
MediaQuery
>
<
MediaQuery
query
=
"(max-width: 1299px)"
>
<
Row
className
=
"little"
>
<
Col
span
=
{
6
}
className
=
"menu"
>
<
Icon
type
=
"unordered-list"
className
=
"more"
onClick
=
{
this
.
showMenu
}
/>
<
div
ref
=
{
div
=>
this
.
divMenu
=
div
}
className
=
"hide"
>
{
this
.
navigationBar
()
}
</
div
>
</
Col
>
<
Col
span
=
{
10
}
className
=
"logo"
>
<
Link
to
=
{
'
/oview
'
}
>
<
img
src
=
{
require
(
'
../static/img/logo2.png
'
)
}
style
=
{
{
width
:
88
}
}
alt
=
"NNI logo"
/>
</
Link
>
</
Col
>
</
Row
>
</
MediaQuery
>
{
this
.
select
()
}
</
Col
>
</
Row
>
</
MediaQuery
>
</
Col
>
<
Col
span
=
{
3
}
>
{
this
.
select
()
}
</
Col
>
</
Row
>
);
}
...
...
src/webui/src/components/TrialsDetail.tsx
View file @
e9040c9b
...
...
@@ -394,15 +394,13 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState>
</
Col
>
<
Col
span
=
{
14
}
className
=
"right"
>
<
Button
type
=
"primary"
className
=
"tableButton editStyle"
className
=
"common"
onClick
=
{
this
.
tableList
?
this
.
tableList
.
addColumn
:
this
.
test
}
>
Add column
</
Button
>
<
Button
type
=
"primary"
className
=
"tableButton editStyle mediateBtn"
className
=
"mediateBtn common"
// use child-component tableList's function, the function is in child-component.
onClick
=
{
this
.
tableList
?
this
.
tableList
.
compareBtn
:
this
.
test
}
>
...
...
src/webui/src/components/trial-detail/Duration.tsx
View file @
e9040c9b
...
...
@@ -163,9 +163,9 @@ class Duration extends React.Component<DurationProps, DurationState> {
}
shouldComponentUpdate
(
nextProps
:
DurationProps
,
nextState
:
DurationState
)
{
const
{
whichGraph
,
source
}
=
nextProps
;
if
(
whichGraph
===
'
3
'
)
{
if
(
whichGraph
===
'
3
'
)
{
const
beforeSource
=
this
.
props
.
source
;
if
(
whichGraph
!==
this
.
props
.
whichGraph
)
{
return
true
;
...
...
@@ -174,13 +174,14 @@ class Duration extends React.Component<DurationProps, DurationState> {
if
(
source
.
length
!==
beforeSource
.
length
)
{
return
true
;
}
if
(
source
[
source
.
length
-
1
].
duration
!==
beforeSource
[
beforeSource
.
length
-
1
].
duration
)
{
return
true
;
}
if
(
source
[
source
.
length
-
1
].
status
!==
beforeSource
[
beforeSource
.
length
-
1
].
status
)
{
return
true
;
if
(
beforeSource
[
beforeSource
.
length
-
1
]
!==
undefined
)
{
if
(
source
[
source
.
length
-
1
].
duration
!==
beforeSource
[
beforeSource
.
length
-
1
].
duration
)
{
return
true
;
}
if
(
source
[
source
.
length
-
1
].
status
!==
beforeSource
[
beforeSource
.
length
-
1
].
status
)
{
return
true
;
}
}
}
return
false
;
...
...
src/webui/src/components/trial-detail/Intermeidate.tsx
View file @
e9040c9b
...
...
@@ -12,7 +12,7 @@ interface IntermediateState {
eachIntermediateNum
:
number
;
// trial's intermediate number count
isLoadconfirmBtn
:
boolean
;
isFilter
:
boolean
;
length
:
number
;
length
:
number
;
clickCounts
:
number
;
// user filter intermediate click confirm btn's counts
}
...
...
@@ -136,7 +136,7 @@ class Intermediate extends React.Component<IntermediateProps, IntermediateState>
},
yAxis
:
{
type
:
'
value
'
,
name
:
'
Scape
'
name
:
'
metric
'
}
};
if
(
this
.
_isMounted
)
{
...
...
@@ -209,7 +209,7 @@ class Intermediate extends React.Component<IntermediateProps, IntermediateState>
componentWillReceiveProps
(
nextProps
:
IntermediateProps
,
nextState
:
IntermediateState
)
{
const
{
isFilter
,
filterSource
}
=
nextState
;
const
{
whichGraph
,
source
}
=
nextProps
;
if
(
whichGraph
===
'
4
'
)
{
if
(
isFilter
===
true
)
{
const
pointVal
=
this
.
pointInput
!==
null
?
this
.
pointInput
.
value
:
''
;
...
...
@@ -226,16 +226,14 @@ class Intermediate extends React.Component<IntermediateProps, IntermediateState>
}
shouldComponentUpdate
(
nextProps
:
IntermediateProps
,
nextState
:
IntermediateState
)
{
const
{
whichGraph
}
=
nextProps
;
const
{
whichGraph
,
source
}
=
nextProps
;
const
beforeGraph
=
this
.
props
.
whichGraph
;
if
(
whichGraph
===
'
4
'
)
{
const
{
source
}
=
nextProps
;
const
{
isFilter
,
length
,
clickCounts
}
=
nextState
;
const
beforeLength
=
this
.
state
.
length
;
const
beforeSource
=
this
.
state
.
detailS
ource
;
const
beforeSource
=
this
.
props
.
s
ource
;
const
beforeClickCounts
=
this
.
state
.
clickCounts
;
if
(
isFilter
!==
this
.
state
.
isFilter
)
{
return
true
;
}
...
...
@@ -243,7 +241,7 @@ class Intermediate extends React.Component<IntermediateProps, IntermediateState>
if
(
clickCounts
!==
beforeClickCounts
)
{
return
true
;
}
if
(
isFilter
===
false
)
{
if
(
whichGraph
!==
beforeGraph
)
{
return
true
;
...
...
@@ -251,15 +249,20 @@ class Intermediate extends React.Component<IntermediateProps, IntermediateState>
if
(
length
!==
beforeLength
)
{
return
true
;
}
if
(
source
[
source
.
length
-
1
].
description
.
intermediate
.
length
!==
beforeSource
[
beforeSource
.
length
-
1
].
description
.
intermediate
.
length
)
{
if
(
beforeSource
.
length
!==
source
.
length
)
{
return
true
;
}
if
(
source
[
source
.
length
-
1
].
duration
!==
beforeSource
[
beforeSource
.
length
-
1
].
duration
)
{
return
true
;
}
if
(
source
[
source
.
length
-
1
].
status
!==
beforeSource
[
beforeSource
.
length
-
1
].
status
)
{
return
true
;
if
(
beforeSource
[
beforeSource
.
length
-
1
]
!==
undefined
)
{
if
(
source
[
source
.
length
-
1
].
description
.
intermediate
.
length
!==
beforeSource
[
beforeSource
.
length
-
1
].
description
.
intermediate
.
length
)
{
return
true
;
}
if
(
source
[
source
.
length
-
1
].
duration
!==
beforeSource
[
beforeSource
.
length
-
1
].
duration
)
{
return
true
;
}
if
(
source
[
source
.
length
-
1
].
status
!==
beforeSource
[
beforeSource
.
length
-
1
].
status
)
{
return
true
;
}
}
}
}
...
...
@@ -291,7 +294,7 @@ class Intermediate extends React.Component<IntermediateProps, IntermediateState>
?
<
div
>
<
Col
span
=
{
3
}
>
<
span
>
S
cape
</
span
>
<
span
>
S
tep
</
span
>
<
input
placeholder
=
"point"
ref
=
{
input
=>
this
.
pointInput
=
input
}
...
...
src/webui/src/static/style/compare.scss
View file @
e9040c9b
.compare
{
width
:
92%
;
table-layout
:
fixed
;
margin
:
0
auto
;
color
:
#333
;
tr
{
line-height
:
30px
;
border-bottom
:
1px
solid
#ccc
;
}
tr
:nth-of-type
(
even
)
{
background-color
:
gainsboro
;
}
.column
{
width
:
124px
;
max-
width
:
124px
;
padding-left
:
18px
;
font-weight
:
700
;
}
.value
{
width
:
152px
;
max-
width
:
152px
;
padding-right
:
18px
;
text-align
:
right
;
text-align
:
left
;
}
.idList
{
font-weight
:
700
;
}
}
src/webui/src/static/style/search.scss
View file @
e9040c9b
...
...
@@ -4,6 +4,13 @@
margin
:
0
auto
;
.right
{
text-align
:
right
;
.common
{
border-radius
:
0
;
}
.common
:hover
{
color
:
#0071BC
;
border-radius
:
0
;
}
}
.entry
{
width
:
120px
;
...
...
@@ -31,8 +38,9 @@
}
}
/* compare button style */
Button
.mediateBtn
{
margin
:
0
3
2px
;
margin
:
0
2
px
0
8
px
;
}
/* each row's Intermediate btn -> Modal*/
...
...
src/webui/src/static/style/slideBar.scss
View file @
e9040c9b
...
...
@@ -34,18 +34,10 @@ $drowHoverBgColor: #e2e2e2;
.feedback
{
position
:
fixed
;
right
:
19
%
;
right
:
26
%
;
line-height
:
$barHeight
;
font-size
:
16px
;
color
:
#fff
;
.fresh
{
span
{
margin
:
0
10px
0
3px
;
}
}
.fresh
:hover
{
cursor
:
pointer
;
}
a
{
color
:
#fff
;
text-decoration
:
none
;
...
...
@@ -60,6 +52,17 @@ $drowHoverBgColor: #e2e2e2;
}
}
/* refresh button */
.fresh
{
border
:
none
;
color
:
#fff
;
font-size
:
16px
;
padding
:
0
;
}
.fresh
:hover
{
color
:
#fff
;
}
.link
li
{
float
:
left
;
}
...
...
@@ -70,8 +73,10 @@ $drowHoverBgColor: #e2e2e2;
}
.interval
{
position
:
fixed
;
right
:
7
%
;
right
:
6
%
;
top
:
12px
;
font-size
:
16px
;
color
:
#fff
;
.ant-select-selection
{
background-color
:
transparent
;
border
:
none
;
...
...
@@ -82,6 +87,10 @@ $drowHoverBgColor: #e2e2e2;
.ant-select-arrow
{
color
:
#fff
;
}
.ant-btn-ghost
[
disabled
]
{
background-color
:
transparent
;
color
:
#fff
;
}
}
/* set select bgcolor */
.ant-select-dropdown-menu
{
...
...
@@ -99,22 +108,30 @@ $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
:
10
0%
;
width
:
9
0%
;
.menu
{
.show
{
display
:
block
;
}
.hide
{
display
:
none
;
}
margin-left
:
33px
;
.more
{
color
:
#fff
;
font-size
:
24px
;
...
...
@@ -125,6 +142,10 @@ $drowHoverBgColor: #e2e2e2;
}
}
.logo
{
text-align
:
center
;
text-align
:
right
;
}
}
.menuModal
{
width
:
198px
;
}
test/config_test/tuners/mnist-gp.test.yml
0 → 100644
View file @
e9040c9b
authorName
:
nni
experimentName
:
default_test
maxExecDuration
:
5m
maxTrialNum
:
2
trialConcurrency
:
1
searchSpacePath
:
search_space.json
tuner
:
builtinTunerName
:
GPTuner
classArgs
:
optimize_mode
:
maximize
utility
:
'
ei'
kappa
:
5.0
xi
:
0.0
nu
:
2.5
alpha
:
1e-6
cold_start_num
:
10
selection_num_warm_up
:
100000
selection_num_starting_points
:
250
assessor
:
builtinAssessorName
:
Medianstop
classArgs
:
optimize_mode
:
maximize
trial
:
codeDir
:
../../../examples/trials/mnist
command
:
python3 mnist.py --batch_num
100
gpuNum
:
0
useAnnotation
:
false
multiPhase
:
false
multiThread
:
false
trainingServicePlatform
:
local
test/naive_test/README_zh_CN.md
View file @
e9040c9b
...
...
@@ -15,6 +15,6 @@
## 问题
*
使用了私有 API 来检测是否 Tuner 和 Assessor 成功结束。
*
使用了私有 API 来检测是否 Tuner 和 Assessor 成功结束。
*
RESTful 服务的输出未测试。
*
远程计算机训练服务没有测试。
\ No newline at end of file
test/pipelines-it-local-windows.yml
View file @
e9040c9b
...
...
@@ -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 @
e9040c9b
...
...
@@ -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 @
e9040c9b
...
...
@@ -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 @
e9040c9b
...
...
@@ -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 @
e9040c9b
...
...
@@ -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 @
e9040c9b
...
...
@@ -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
:
...
...
tools/nni_annotation/README_zh_CN.md
View file @
e9040c9b
...
...
@@ -27,7 +27,7 @@ NNI 中,有 4 种类型的 Annotation;
**参数**
-
**sampling_algo**
: 指定搜索空间的采样算法。 可将其换成 NNI 支持的其它采样函数,函数要以
`nni.`
开头。例如,
`choice`
或
`uniform`
,详见
[
SearchSpaceSpec
](
https://nni.readthedocs.io/zh/latest/SearchSpaceSpec.html
)
。
-
**sampling_algo**
: 指定搜索空间的采样算法。 可将其换成 NNI 支持的其它采样函数,函数要以
`nni.`
开头。例如,
`choice`
或
`uniform`
,详见
[
SearchSpaceSpec
](
https://nni.readthedocs.io/zh/latest/SearchSpaceSpec.html
)
。
-
**name**
: 将被赋值的变量名称。 注意,此参数应该与下面一行等号左边的值相同。
NNI 支持如下 10 种类型来表示搜索空间:
...
...
Prev
1
2
3
4
5
6
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