Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
b1dfafff
Unverified
Commit
b1dfafff
authored
Apr 18, 2019
by
SparkSnail
Committed by
GitHub
Apr 18, 2019
Browse files
Merge pull request #161 from Microsoft/master
merge master
parents
aec49771
cbad7acb
Changes
37
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
210 additions
and
554 deletions
+210
-554
Makefile
Makefile
+14
-3
src/nni_manager/training_service/pai/paiTrainingService.ts
src/nni_manager/training_service/pai/paiTrainingService.ts
+9
-1
src/sdk/pynni/nni/hyperopt_tuner/hyperopt_tuner.py
src/sdk/pynni/nni/hyperopt_tuner/hyperopt_tuner.py
+1
-1
src/webui/public/icon.png
src/webui/public/icon.png
+0
-0
src/webui/src/components/Control.tsx
src/webui/src/components/Control.tsx
+0
-395
src/webui/src/components/Overview.tsx
src/webui/src/components/Overview.tsx
+28
-22
src/webui/src/components/SlideBar.tsx
src/webui/src/components/SlideBar.tsx
+1
-1
src/webui/src/components/TrialsDetail.tsx
src/webui/src/components/TrialsDetail.tsx
+8
-8
src/webui/src/components/overview/Accuracy.tsx
src/webui/src/components/overview/Accuracy.tsx
+1
-1
src/webui/src/components/overview/BasicInfo.tsx
src/webui/src/components/overview/BasicInfo.tsx
+4
-4
src/webui/src/components/overview/Progress.tsx
src/webui/src/components/overview/Progress.tsx
+57
-57
src/webui/src/components/overview/ProgressItem.tsx
src/webui/src/components/overview/ProgressItem.tsx
+2
-2
src/webui/src/components/overview/SearchSpace.tsx
src/webui/src/components/overview/SearchSpace.tsx
+1
-1
src/webui/src/components/overview/SuccessTable.tsx
src/webui/src/components/overview/SuccessTable.tsx
+4
-4
src/webui/src/components/overview/TrialProfile.tsx
src/webui/src/components/overview/TrialProfile.tsx
+1
-1
src/webui/src/components/public-child/LogPath.tsx
src/webui/src/components/public-child/LogPath.tsx
+2
-2
src/webui/src/components/public-child/OpenRow.tsx
src/webui/src/components/public-child/OpenRow.tsx
+70
-44
src/webui/src/components/public-child/PaiTrialLog.tsx
src/webui/src/components/public-child/PaiTrialLog.tsx
+3
-3
src/webui/src/components/public-child/TrialLog.tsx
src/webui/src/components/public-child/TrialLog.tsx
+1
-1
src/webui/src/components/trial-detail/DefaultMetricPoint.tsx
src/webui/src/components/trial-detail/DefaultMetricPoint.tsx
+3
-3
No files found.
Makefile
View file @
b1dfafff
...
...
@@ -111,8 +111,8 @@ dev-install:
.PHONY
:
uninstall
uninstall
:
-
$(PIP_UNINSTALL)
-y
nni
-
$(PIP_UNINSTALL)
-y
nnictl
-
cd
build
&&
$(PIP_UNINSTALL)
-y
nni
-
rm
-rf
build
-
rm
-rf
$(NNI_PKG_FOLDER)
-
rm
-f
$(BIN_FOLDER)
/node
-
rm
-f
$(BIN_FOLDER)
/nnictl
...
...
@@ -164,7 +164,18 @@ install-python-modules:
.PHONY
:
dev-install-python-modules
dev-install-python-modules
:
#
$(_INFO)
Installing Python SDK
$(_END)
sed
-ie
's/
$(NNI_VERSION_TEMPLATE)
/
$(NNI_VERSION_VALUE)
/'
setup.py
&&
$(PIP_INSTALL)
$(PIP_MODE)
-e
.
mkdir
-p
build
ln
-sf
../src/sdk/pynni/nni build/nni
ln
-sf
../tools/nni_annotation build/nni_annotation
ln
-sf
../tools/nni_cmd build/nni_cmd
ln
-sf
../tools/nni_trial_tool build/nni_trial_tool
ln
-sf
../tools/nni_gpu_tool build/nni_gpu_tool
cp
setup.py build/
cp
README.md build/
sed
-ie
's/
$(NNI_VERSION_TEMPLATE)
/
$(NNI_VERSION_VALUE)
/'
build/setup.py
sed
-ie
's/src\/sdk\/pynni\/nni/nni/g'
build/setup.py
sed
-ie
's/tools\///g'
build/setup.py
cd
build
&&
$(PIP_INSTALL)
$(PIP_MODE)
-e
.
.PHONY
:
install-node-modules
...
...
src/nni_manager/training_service/pai/paiTrainingService.ts
View file @
b1dfafff
...
...
@@ -529,7 +529,15 @@ class PAITrainingService implements TrainingService {
private
async
statusCheckingLoop
():
Promise
<
void
>
{
while
(
!
this
.
stopping
)
{
try
{
await
this
.
updatePaiToken
();
}
catch
(
error
){
this
.
log
.
error
(
`
${
error
}
`
);
//only throw error when initlize paiToken first time
if
(
!
this
.
paiToken
)
{
throw
new
Error
(
error
);
}
}
await
this
.
paiJobCollector
.
retrieveTrialStatus
(
this
.
paiToken
,
this
.
paiClusterConfig
);
const
restServer
:
PAIJobRestServer
=
component
.
get
(
PAIJobRestServer
);
if
(
restServer
.
getErrorMessage
)
{
...
...
src/sdk/pynni/nni/hyperopt_tuner/hyperopt_tuner.py
View file @
b1dfafff
...
...
@@ -347,7 +347,7 @@ class HyperoptTuner(Tuner):
for
key
in
vals
:
try
:
parameter
[
key
]
=
vals
[
key
][
0
].
item
()
except
KeyError
:
except
(
KeyError
,
IndexError
)
:
parameter
[
key
]
=
None
# remove '_index' from json2parameter and save params-id
...
...
src/webui/public/icon.png
View replaced file @
aec49771
View file @
b1dfafff
29.9 KB
|
W:
|
H:
2.23 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/webui/src/components/Control.tsx
deleted
100644 → 0
View file @
aec49771
import
*
as
React
from
'
react
'
;
import
{
Input
,
Button
,
message
}
from
'
antd
'
;
import
axios
from
'
axios
'
;
import
{
MANAGER_IP
,
CONTROLTYPE
}
from
'
../static/const
'
;
const
{
TextArea
}
=
Input
;
import
'
../static/style/control.scss
'
;
interface
ExperimentParams
{
authorName
:
string
;
experimentName
:
string
;
trialConcurrency
:
number
;
maxExecDuration
:
number
;
maxTrialNum
:
number
;
searchSpace
:
string
;
tuner
:
{
tunerCommand
:
string
;
tunerCwd
:
string
;
tunerCheckpointDirectory
:
string
;
tunerGpuNum
?:
number
;
};
assessor
?:
{
assessorCommand
:
string
;
assessorCwd
:
string
;
assessorCheckpointDirectory
:
string
;
assessorGpuNum
?:
number
;
};
}
interface
Experiments
{
params
:
ExperimentParams
;
id
:
string
;
startTime
?:
Date
;
endTime
?:
Date
;
revision
:
number
;
execDuration
:
number
;
}
interface
TrialNumber
{
maxExecDuration
:
number
;
trialConcurrency
:
number
;
}
interface
ControlState
{
addisabled
:
boolean
;
addTrial
:
string
;
updateSearch
:
string
;
trialNum
:
TrialNumber
;
trialMess
:
string
;
updisabled
:
boolean
;
upTrialdis
:
boolean
;
experiment
:
Experiments
;
}
class
Control
extends
React
.
Component
<
{},
ControlState
>
{
public
_isMounted
=
false
;
constructor
(
props
:
{})
{
super
(
props
);
this
.
state
=
{
addisabled
:
false
,
upTrialdis
:
false
,
addTrial
:
''
,
updateSearch
:
''
,
updisabled
:
false
,
trialNum
:
{
maxExecDuration
:
0
,
trialConcurrency
:
0
},
trialMess
:
''
,
// experiment origin data obj
experiment
:
{
params
:
{
authorName
:
''
,
experimentName
:
''
,
trialConcurrency
:
0
,
maxExecDuration
:
0
,
maxTrialNum
:
0
,
searchSpace
:
''
,
tuner
:
{
tunerCommand
:
''
,
tunerCwd
:
''
,
tunerCheckpointDirectory
:
''
,
}
},
id
:
''
,
revision
:
0
,
execDuration
:
0
,
}
};
}
updateTrialNumLoad
=
()
=>
{
if
(
this
.
_isMounted
)
{
this
.
setState
({
upTrialdis
:
true
,
});
}
}
updateTrialNumNormal
=
()
=>
{
if
(
this
.
_isMounted
)
{
this
.
setState
({
upTrialdis
:
false
,
});
}
}
addButtonLoad
=
()
=>
{
if
(
this
.
_isMounted
)
{
this
.
setState
({
addisabled
:
true
});
}
}
addButtonNormal
=
()
=>
{
if
(
this
.
_isMounted
)
{
this
.
setState
({
addisabled
:
false
,
});
}
}
updateSearchLoad
=
()
=>
{
if
(
this
.
_isMounted
)
{
this
.
setState
({
updisabled
:
true
,
});
}
}
updateSearchNormal
=
()
=>
{
if
(
this
.
_isMounted
)
{
this
.
setState
({
updisabled
:
false
,
});
}
}
getTrialNum
=
(
event
:
React
.
ChangeEvent
<
HTMLTextAreaElement
>
)
=>
{
if
(
this
.
_isMounted
)
{
this
.
setState
({
trialMess
:
event
.
target
.
value
});
}
}
getAddTrialval
=
(
event
:
React
.
ChangeEvent
<
HTMLTextAreaElement
>
)
=>
{
if
(
this
.
_isMounted
)
{
this
.
setState
({
addTrial
:
event
.
target
.
value
});
}
}
updateSearchCon
=
(
event
:
React
.
ChangeEvent
<
HTMLTextAreaElement
>
)
=>
{
if
(
this
.
_isMounted
)
{
this
.
setState
({
updateSearch
:
event
.
target
.
value
});
}
}
// get add trial example
getAddExample
=
()
=>
{
axios
(
`
${
MANAGER_IP
}
/trial-jobs`
,
{
method
:
'
GET
'
}).
then
(
res
=>
{
if
(
res
.
status
===
200
&&
this
.
_isMounted
)
{
if
(
res
.
data
.
length
!==
0
)
{
const
addTrialExam
=
JSON
.
parse
(
res
.
data
[
0
].
hyperParameters
).
parameters
;
this
.
setState
({
addTrial
:
JSON
.
stringify
(
addTrialExam
,
null
,
4
)
});
}
}
});
}
// get update search_space file and experiment
getUpdateExample
=
()
=>
{
axios
(
`
${
MANAGER_IP
}
/experiment`
,
{
method
:
'
GET
'
}).
then
(
res
=>
{
if
(
res
.
status
===
200
&&
this
.
_isMounted
)
{
const
sespaceExam
=
JSON
.
parse
(
res
.
data
.
params
.
searchSpace
);
const
trialnum
:
Array
<
TrialNumber
>
=
[];
trialnum
.
push
({
maxExecDuration
:
res
.
data
.
params
.
maxExecDuration
,
trialConcurrency
:
res
.
data
.
params
.
trialConcurrency
});
this
.
setState
(()
=>
({
updateSearch
:
JSON
.
stringify
(
sespaceExam
,
null
,
4
),
trialNum
:
trialnum
[
0
],
trialMess
:
JSON
.
stringify
(
trialnum
[
0
],
null
,
4
),
experiment
:
res
.
data
}));
}
});
}
// update trial number parameters
trialParameterMess
=
(
exper
:
Experiments
,
str
:
string
)
=>
{
axios
(
`
${
MANAGER_IP
}
/experiment`
,
{
method
:
'
PUT
'
,
headers
:
{
'
Content-Type
'
:
'
application/json;charset=utf-8
'
},
data
:
exper
,
params
:
{
update_type
:
str
,
}
}).
then
(
res
=>
{
if
(
res
.
status
===
200
)
{
message
.
success
(
`Update
${
str
.
toLocaleLowerCase
()}
successfully`
);
this
.
getUpdateExample
();
}
else
{
message
.
error
(
`Update
${
str
.
toLocaleLowerCase
()}
failed`
);
}
});
}
updateTrialMess
=
()
=>
{
const
{
trialMess
}
=
this
.
state
;
if
(
trialMess
!==
''
||
trialMess
!==
null
)
{
this
.
updateTrialNumLoad
();
const
{
experiment
}
=
this
.
state
;
const
newExperiment
=
JSON
.
parse
(
JSON
.
stringify
(
experiment
));
const
trialObj
=
JSON
.
parse
(
trialMess
);
const
orimaxDuration
=
experiment
.
params
.
maxExecDuration
;
const
oriconTrial
=
experiment
.
params
.
trialConcurrency
;
const
flagMax
=
(
trialObj
.
maxExecDuration
!==
orimaxDuration
);
const
flagCon
=
(
trialObj
.
trialConcurrency
!==
oriconTrial
);
if
(
flagCon
&&
flagMax
)
{
newExperiment
.
params
.
trialConcurrency
=
trialObj
.
trialConcurrency
;
newExperiment
.
params
.
maxExecDuration
=
trialObj
.
maxExecDuration
;
this
.
trialParameterMess
(
newExperiment
,
CONTROLTYPE
[
1
]);
this
.
trialParameterMess
(
newExperiment
,
CONTROLTYPE
[
2
]);
}
else
if
(
flagCon
)
{
newExperiment
.
params
.
trialConcurrency
=
trialObj
.
trialConcurrency
;
this
.
trialParameterMess
(
newExperiment
,
CONTROLTYPE
[
1
]);
}
else
if
(
flagMax
)
{
newExperiment
.
params
.
maxExecDuration
=
trialObj
.
maxExecDuration
;
this
.
trialParameterMess
(
newExperiment
,
CONTROLTYPE
[
2
]);
}
else
{
message
.
info
(
'
you have not modified this file
'
);
}
this
.
updateTrialNumNormal
();
}
else
{
message
.
error
(
'
The text can not be empty
'
);
}
}
userSubmitJob
=
()
=>
{
const
{
addTrial
}
=
this
.
state
;
if
(
addTrial
===
null
||
addTrial
===
''
)
{
message
.
error
(
'
The text can not be empty
'
);
}
else
{
this
.
addButtonLoad
();
// new experiment obj
axios
(
`
${
MANAGER_IP
}
/trial-jobs`
,
{
method
:
'
POST
'
,
headers
:
{
'
Content-Type
'
:
'
application/json
'
},
data
:
addTrial
}).
then
(
res
=>
{
if
(
res
.
status
===
200
)
{
message
.
success
(
'
Submit successfully
'
);
}
else
{
message
.
error
(
'
Submit failed
'
);
}
this
.
addButtonNormal
();
});
}
}
userUpdateSeaspace
=
()
=>
{
this
.
updateSearchLoad
();
const
{
updateSearch
}
=
this
.
state
;
if
(
updateSearch
!==
''
||
updateSearch
!==
null
)
{
const
{
experiment
}
=
this
.
state
;
const
newExperiment
=
JSON
.
parse
(
JSON
.
stringify
(
experiment
));
newExperiment
.
params
.
searchSpace
=
updateSearch
;
this
.
trialParameterMess
(
newExperiment
,
CONTROLTYPE
[
0
]);
this
.
updateSearchNormal
();
}
else
{
message
.
error
(
'
The text can not be empty
'
);
}
}
componentDidMount
()
{
this
.
_isMounted
=
true
;
this
.
getAddExample
();
this
.
getUpdateExample
();
}
componentWillUnmount
()
{
this
.
_isMounted
=
false
;
}
render
()
{
const
{
addTrial
,
addisabled
,
updateSearch
,
updisabled
,
trialMess
,
upTrialdis
}
=
this
.
state
;
return
(
<
div
className
=
"user"
>
<
div
className
=
"userCon"
>
<
div
className
=
"addtrial"
>
<
div
className
=
"addtitle"
>
<
span
className
=
"line"
>
|
</
span
>
Experiment parameters
</
div
>
<
div
className
=
"userInput"
>
<
TextArea
value
=
{
trialMess
}
autosize
=
{
{
minRows
:
9
}
}
onChange
=
{
this
.
getTrialNum
}
/>
</
div
>
<
div
className
=
"addBtubox"
>
<
Button
className
=
"userSubmit"
type
=
"primary"
onClick
=
{
this
.
updateTrialMess
}
disabled
=
{
upTrialdis
}
>
Update
</
Button
>
</
div
>
</
div
>
<
div
className
=
"clear"
/>
<
div
className
=
"addtrial"
>
<
div
className
=
"addtitle"
>
<
span
className
=
"line"
>
|
</
span
>
Add New Trail
</
div
>
<
div
className
=
"userInput"
>
<
TextArea
id
=
"userInputJob"
value
=
{
addTrial
}
autosize
=
{
{
minRows
:
9
}
}
onChange
=
{
this
.
getAddTrialval
}
/>
</
div
>
<
div
className
=
"addBtubox"
>
<
Button
className
=
"userSubmit"
type
=
"primary"
onClick
=
{
this
.
userSubmitJob
}
disabled
=
{
addisabled
}
>
Submit
</
Button
>
</
div
>
</
div
>
{
/* clear float */
}
<
div
className
=
"clear"
/>
<
div
className
=
"searchbox"
>
<
div
className
=
"updatesear"
>
<
span
className
=
"line"
>
|
</
span
>
user update search_space file
</
div
>
<
div
className
=
"userInput"
>
<
TextArea
id
=
"InputUpdate"
autosize
=
{
{
minRows
:
20
}
}
value
=
{
updateSearch
}
onChange
=
{
this
.
updateSearchCon
}
/>
</
div
>
<
div
className
=
"addBtubox"
>
<
Button
className
=
"buttonbac"
type
=
"primary"
onClick
=
{
this
.
userUpdateSeaspace
}
disabled
=
{
updisabled
}
>
Update
</
Button
>
</
div
>
</
div
>
</
div
>
</
div
>
);
}
}
export
default
Control
;
\ No newline at end of file
src/webui/src/components/Overview.tsx
View file @
b1dfafff
...
...
@@ -315,6 +315,10 @@ class Overview extends React.Component<{}, OverviewState> {
indexarr
.
push
(
items
.
sequenceId
);
});
const
accOption
=
{
grid
:
{
left
:
40
,
right
:
40
},
tooltip
:
{
trigger
:
'
item
'
},
...
...
@@ -324,7 +328,7 @@ class Overview extends React.Component<{}, OverviewState> {
data
:
indexarr
},
yAxis
:
{
name
:
'
Default
M
etric
'
,
name
:
'
Default
m
etric
'
,
type
:
'
value
'
,
scale
:
true
,
data
:
accarr
...
...
@@ -405,7 +409,7 @@ class Overview extends React.Component<{}, OverviewState> {
</
Row
>
<
Row
className
=
"overMessage"
>
{
/* status graph */
}
<
Col
span
=
{
8
}
className
=
"prograph overviewBoder"
>
<
Col
span
=
{
9
}
className
=
"prograph overviewBoder"
>
<
Title1
text
=
"Status"
icon
=
"5.png"
/>
<
Progressed
trialNumber
=
{
trialNumber
}
...
...
@@ -417,8 +421,8 @@ class Overview extends React.Component<{}, OverviewState> {
/>
</
Col
>
{
/* experiment parameters search space tuner assessor... */
}
<
Col
span
=
{
8
}
className
=
"overviewBoder"
>
<
Title1
text
=
"Search
S
pace"
icon
=
"10.png"
/>
<
Col
span
=
{
7
}
className
=
"overviewBoder"
>
<
Title1
text
=
"Search
s
pace"
icon
=
"10.png"
/>
<
Row
className
=
"experiment"
>
<
SearchSpace
searchSpace
=
{
searchSpace
}
/>
</
Row
>
...
...
@@ -436,7 +440,7 @@ class Overview extends React.Component<{}, OverviewState> {
<
Row
className
=
"overGraph"
>
<
Row
className
=
"top10bg"
>
<
Col
span
=
{
4
}
className
=
"top10Title"
>
<
Title1
text
=
"Top10
T
rials"
icon
=
"7.png"
/>
<
Title1
text
=
"Top10
t
rials"
icon
=
"7.png"
/>
</
Col
>
<
Col
span
=
{
2
}
...
...
@@ -453,6 +457,7 @@ class Overview extends React.Component<{}, OverviewState> {
<
Title1
text
=
"Minimal"
icon
=
"min.png"
bgcolor
=
{
titleMinbgcolor
}
/>
</
Col
>
</
Row
>
<
Row
>
<
Col
span
=
{
8
}
className
=
"overviewBoder"
>
<
Row
className
=
"accuracy"
>
<
Accuracy
...
...
@@ -470,6 +475,7 @@ class Overview extends React.Component<{}, OverviewState> {
/>
</
Col
>
</
Row
>
</
Row
>
</
div
>
);
}
...
...
src/webui/src/components/SlideBar.tsx
View file @
b1dfafff
...
...
@@ -209,7 +209,7 @@ class SlideBar extends React.Component<{}, SliderState> {
</
li
>
<
li
className
=
"tab"
>
<
Link
to
=
{
'
/detail
'
}
activeClassName
=
"high"
>
Trials
D
etail
Trials
d
etail
</
Link
>
</
li
>
</
ul
>
...
...
src/webui/src/components/TrialsDetail.tsx
View file @
b1dfafff
...
...
@@ -38,21 +38,21 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
public
tableList
:
TableList
|
null
;
private
titleOfacc
=
(
<
Title1
text
=
"Default
M
etric"
icon
=
"3.png"
/>
<
Title1
text
=
"Default
m
etric"
icon
=
"3.png"
/>
);
private
titleOfhyper
=
(
<
Title1
text
=
"Hyper
P
arameter"
icon
=
"1.png"
/>
<
Title1
text
=
"Hyper
-p
arameter"
icon
=
"1.png"
/>
);
private
titleOfDuration
=
(
<
Title1
text
=
"Trial
D
uration"
icon
=
"2.png"
/>
<
Title1
text
=
"Trial
d
uration"
icon
=
"2.png"
/>
);
private
titleOfIntermediate
=
(
<
div
className
=
"panelTitle"
>
<
Icon
type
=
"line-chart"
/>
<
span
>
Intermediate
R
esult
</
span
>
<
span
>
Intermediate
r
esult
</
span
>
</
div
>
);
...
...
@@ -360,10 +360,10 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
</
Tabs
>
</
div
>
{
/* trial table list */
}
<
Title1
text
=
"Trial
J
obs"
icon
=
"6.png"
/>
<
Title1
text
=
"Trial
j
obs"
icon
=
"6.png"
/>
<
Row
className
=
"allList"
>
<
Col
span
=
{
12
}
>
<
span
>
s
how
</
span
>
<
span
>
S
how
</
span
>
<
Select
className
=
"entry"
onSelect
=
{
this
.
handleEntriesSelect
}
...
...
@@ -384,13 +384,13 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
className
=
"tableButton editStyle"
onClick
=
{
this
.
tableList
?
this
.
tableList
.
addColumn
:
this
.
test
}
>
Add
C
olumn
Add
c
olumn
</
Button
>
</
Col
>
<
Col
span
=
{
12
}
>
<
Input
type
=
"text"
placeholder
=
"
s
earch by
I
d,
T
rial No. or
S
tatus"
placeholder
=
"
S
earch by
i
d,
t
rial No. or
s
tatus"
onChange
=
{
this
.
searchTrial
}
style
=
{
{
width
:
230
,
marginLeft
:
6
}
}
/>
...
...
src/webui/src/components/overview/Accuracy.tsx
View file @
b1dfafff
...
...
@@ -28,7 +28,7 @@ class Accuracy extends React.Component<AccuracyProps, {}> {
<
ReactEcharts
option
=
{
accuracyData
}
style
=
{
{
width
:
'
10
0%
'
,
width
:
'
9
0%
'
,
height
:
height
,
margin
:
'
0 auto
'
,
}
}
...
...
src/webui/src/components/overview/BasicInfo.tsx
View file @
b1dfafff
...
...
@@ -27,11 +27,11 @@ class BasicInfo extends React.Component<BasicInfoProps, {}> {
<
div
>
{
trialProfile
.
id
}
</
div
>
</
Col
>
<
Col
span
=
{
8
}
className
=
"padItem basic"
>
<
p
>
Start
T
ime
</
p
>
<
p
>
Start
t
ime
</
p
>
<
div
className
=
"nowrap"
>
{
new
Date
(
trialProfile
.
startTime
).
toLocaleString
(
'
en-US
'
)
}
</
div
>
<
p
>
End
T
ime
</
p
>
<
p
>
End
t
ime
</
p
>
<
div
className
=
"nowrap"
>
{
trialProfile
.
endTime
...
...
@@ -43,13 +43,13 @@ class BasicInfo extends React.Component<BasicInfoProps, {}> {
</
div
>
</
Col
>
<
Col
span
=
{
8
}
className
=
"padItem basic"
>
<
p
>
Log
D
irectory
</
p
>
<
p
>
Log
d
irectory
</
p
>
<
div
className
=
"nowrap"
>
<
Tooltip
placement
=
"top"
title
=
{
trialProfile
.
logDir
}
>
{
trialProfile
.
logDir
}
</
Tooltip
>
</
div
>
<
p
>
Training
P
latform
</
p
>
<
p
>
Training
p
latform
</
p
>
<
div
className
=
"nowrap"
>
{
trialProfile
.
trainingServicePlatform
...
...
src/webui/src/components/overview/Progress.tsx
View file @
b1dfafff
...
...
@@ -60,6 +60,7 @@ class Progressed extends React.Component<ProgressProps, ProgressState> {
const
trialConcurrency
=
experimentFile
.
params
.
trialConcurrency
;
if
(
userInputVal
!==
undefined
)
{
if
(
userInputVal
===
trialConcurrency
.
toString
()
||
userInputVal
===
'
0
'
)
{
message
.
destroy
();
message
.
info
(
`trialConcurrency's value is
${
trialConcurrency
}
, you did not modify it`
,
2
);
}
else
{
...
...
@@ -76,6 +77,7 @@ class Progressed extends React.Component<ProgressProps, ProgressState> {
}
}).
then
(
res
=>
{
if
(
res
.
status
===
200
)
{
message
.
destroy
();
message
.
success
(
`Update
${
CONTROLTYPE
[
1
].
toLocaleLowerCase
()}
successfully`
);
// rerender trial profile message
...
...
@@ -200,87 +202,85 @@ class Progressed extends React.Component<ProgressProps, ProgressState> {
percent
=
{
percent
}
description
=
{
runDuration
}
bgclass
=
{
status
}
maxString
=
{
`Max
D
uration:
${
convertTime
(
trialProfile
.
maxDuration
)}
`
}
maxString
=
{
`Max
d
uration:
${
convertTime
(
trialProfile
.
maxDuration
)}
`
}
/>
<
ProgressBar
who
=
"Trial
Num
"
who
=
"Trial
numbers
"
percent
=
{
bar2Percent
}
description
=
{
bar2
.
toString
()
}
bgclass
=
{
status
}
maxString
=
{
`Max
T
rial
N
umber:
${
trialProfile
.
MaxTrialNum
}
`
}
maxString
=
{
`Max
t
rial
n
umber:
${
trialProfile
.
MaxTrialNum
}
`
}
/>
<
Row
className
=
"basic colorOfbasic mess"
>
<
Col
span
=
{
10
}
>
<
p
>
best metric
</
p
>
<
p
>
Best metric
</
p
>
<
div
>
{
bestAccuracy
.
toFixed
(
6
)
}
</
div
>
</
Col
>
<
Col
span
=
{
14
}
>
{
/* modify concurrency */
}
<
p
>
concurrency
</
p
>
<
Row
className
=
"inputBox"
>
<
input
type
=
"number"
disabled
=
{
isEnable
}
onChange
=
{
this
.
getUserTrialConcurrency
}
className
=
"concurrencyInput"
ref
=
{
(
input
)
=>
this
.
conInput
=
input
}
/>
<
Button
type
=
"primary"
className
=
"tableButton editStyle"
onClick
=
{
this
.
editTrialConcurrency
}
>
{
btnName
}
</
Button
>
<
Button
type
=
"primary"
onClick
=
{
this
.
cancelFunction
}
style
=
{
{
display
:
cancelSty
,
marginLeft
:
1
}
}
className
=
"tableButton editStyle"
>
Cancel
</
Button
>
</
Row
>
</
Col
>
</
Row
>
<
Row
className
=
"mess"
>
<
Col
span
=
{
8
}
>
<
Col
span
=
{
6
}
>
<
Row
className
=
"basic colorOfbasic"
>
<
p
>
s
pent
</
p
>
<
p
>
S
pent
</
p
>
<
div
>
{
convertTime
(
trialProfile
.
execDuration
)
}
</
div
>
</
Row
>
</
Col
>
<
Col
span
=
{
9
}
>
<
Col
span
=
{
6
}
>
<
Row
className
=
"basic colorOfbasic"
>
<
p
>
r
emaining
</
p
>
<
p
>
R
emaining
</
p
>
<
div
>
{
remaining
}
</
div
>
</
Row
>
</
Col
>
<
Col
span
=
{
7
}
>
<
Col
span
=
{
6
}
>
<
Row
className
=
"basic colorOfbasic"
>
<
p
>
r
unning
</
p
>
<
p
>
R
unning
</
p
>
<
div
>
{
trialNumber
.
runTrial
}
</
div
>
</
Row
>
</
Col
>
</
Row
>
<
Row
className
=
"mess"
>
<
Col
span
=
{
8
}
>
<
Col
span
=
{
6
}
>
<
Row
className
=
"basic colorOfbasic"
>
<
p
>
s
ucceed
</
p
>
<
p
>
S
ucceed
ed
</
p
>
<
div
>
{
trialNumber
.
succTrial
}
</
div
>
</
Row
>
</
Col
>
<
Col
span
=
{
9
}
>
</
Row
>
<
Row
className
=
"mess"
>
<
Col
span
=
{
6
}
>
<
Row
className
=
"basic"
>
<
p
>
s
topped
</
p
>
<
p
>
S
topped
</
p
>
<
div
>
{
trialNumber
.
stopTrial
}
</
div
>
</
Row
>
</
Col
>
<
Col
span
=
{
7
}
>
<
Col
span
=
{
6
}
>
<
Row
className
=
"basic"
>
<
p
>
f
ailed
</
p
>
<
p
>
F
ailed
</
p
>
<
div
>
{
trialNumber
.
failTrial
}
</
div
>
</
Row
>
</
Col
>
<
Col
span
=
{
12
}
>
{
/* modify concurrency */
}
<
p
>
Concurrency
</
p
>
<
Row
className
=
"inputBox"
>
<
input
type
=
"number"
disabled
=
{
isEnable
}
onChange
=
{
this
.
getUserTrialConcurrency
}
className
=
"concurrencyInput"
ref
=
{
(
input
)
=>
this
.
conInput
=
input
}
/>
<
Button
type
=
"primary"
className
=
"tableButton editStyle"
onClick
=
{
this
.
editTrialConcurrency
}
>
{
btnName
}
</
Button
>
<
Button
type
=
"primary"
onClick
=
{
this
.
cancelFunction
}
style
=
{
{
display
:
cancelSty
,
marginLeft
:
1
}
}
className
=
"tableButton editStyle"
>
Cancel
</
Button
>
</
Row
>
</
Col
>
</
Row
>
</
Row
>
);
...
...
src/webui/src/components/overview/ProgressItem.tsx
View file @
b1dfafff
...
...
@@ -22,10 +22,10 @@ class ProgressBar extends React.Component<ProItemProps, {}> {
return
(
<
div
>
<
Row
className
=
{
`probar
${
bgclass
}
`
}
>
<
Col
span
=
{
6
}
>
<
Col
span
=
{
8
}
>
<
div
className
=
"name"
>
{
who
}
</
div
>
</
Col
>
<
Col
span
=
{
1
7
}
className
=
"bar"
>
<
Col
span
=
{
1
6
}
className
=
"bar"
>
<
div
className
=
"showProgress"
>
<
Progress
percent
=
{
percent
}
...
...
src/webui/src/components/overview/SearchSpace.tsx
View file @
b1dfafff
...
...
@@ -19,7 +19,7 @@ class SearchSpace extends React.Component<SearchspaceProps, {}> {
<
div
className
=
"searchSpace"
>
<
MonacoEditor
width
=
"100%"
height
=
"3
80
"
height
=
"3
61
"
language
=
"json"
theme
=
"vs-light"
value
=
{
JSON
.
stringify
(
searchSpace
,
null
,
2
)
}
...
...
src/webui/src/components/overview/SuccessTable.tsx
View file @
b1dfafff
...
...
@@ -5,7 +5,7 @@ import DefaultMetric from '../public-child/DefaultMetrc';
import
{
TableObj
}
from
'
../../static/interface
'
;
import
{
convertDuration
}
from
'
../../static/function
'
;
import
'
../../static/style/tableStatus.css
'
;
import
'
../../static/style/
tableList
.scss
'
;
import
'
../../static/style/
openRow
.scss
'
;
interface
SuccessTableProps
{
tableSource
:
Array
<
TableObj
>
;
...
...
@@ -52,11 +52,11 @@ class SuccessTable extends React.Component<SuccessTableProps, {}> {
width
:
140
,
className
:
'
tableHead
'
},
{
title
:
'
I
d
'
,
title
:
'
I
D
'
,
dataIndex
:
'
id
'
,
key
:
'
id
'
,
width
:
60
,
className
:
'
tableHead
idt
itle
'
,
className
:
'
tableHead
leftT
itle
'
,
render
:
(
text
:
string
,
record
:
TableObj
)
=>
{
return
(
<
div
>
{
record
.
id
}
</
div
>
...
...
@@ -92,7 +92,7 @@ class SuccessTable extends React.Component<SuccessTableProps, {}> {
);
}
},
{
title
:
'
Default
M
etric
'
,
title
:
'
Default
m
etric
'
,
dataIndex
:
'
acc
'
,
key
:
'
acc
'
,
sorter
:
(
a
:
TableObj
,
b
:
TableObj
)
=>
{
...
...
src/webui/src/components/overview/TrialProfile.tsx
View file @
b1dfafff
...
...
@@ -42,7 +42,7 @@ class TrialInfo extends React.Component<TrialInfoProps, {}> {
<
div
className
=
"profile"
>
<
MonacoEditor
width
=
"100%"
height
=
"3
80
"
height
=
"3
61
"
language
=
"json"
theme
=
"vs-light"
value
=
{
JSON
.
stringify
(
experiment
,
null
,
2
)
}
...
...
src/webui/src/components/public-child/LogPath.tsx
View file @
b1dfafff
...
...
@@ -31,13 +31,13 @@ class LogPath extends React.Component<LogpathProps, {}> {
/>
<
LogPathChild
eachLogpath
=
{
logStr
.
split
(
'
,
'
)[
1
]
}
logName
=
"
hdfsLogPath
:"
logName
=
"
Log on HDFS
:"
/>
</
div
>
:
<
LogPathChild
eachLogpath
=
{
logStr
}
logName
=
"Log
P
ath:"
logName
=
"Log
p
ath:"
/>
}
</
div
>
...
...
src/webui/src/components/public-child/OpenRow.tsx
View file @
b1dfafff
...
...
@@ -13,26 +13,44 @@ interface OpenRowProps {
logCollection
:
boolean
;
}
class
OpenRow
extends
React
.
Component
<
OpenRowProps
,
{}
>
{
interface
OpenRowState
{
idList
:
Array
<
string
>
;
}
class
OpenRow
extends
React
.
Component
<
OpenRowProps
,
OpenRowState
>
{
constructor
(
props
:
OpenRowProps
)
{
super
(
props
);
this
.
state
=
{
idList
:
[
''
]
};
}
copyParams
=
(
record
:
TableObj
)
=>
{
let
params
=
JSON
.
stringify
(
record
.
description
.
parameters
);
// json format
const
params
=
JSON
.
stringify
(
record
.
description
.
parameters
,
null
,
4
);
if
(
copy
(
params
))
{
message
.
destroy
();
message
.
success
(
'
Success copy parameters to clipboard in form of python dict !
'
,
3
);
const
{
idList
}
=
this
.
state
;
const
copyIdList
:
Array
<
string
>
=
idList
;
copyIdList
[
copyIdList
.
length
-
1
]
=
record
.
id
;
this
.
setState
(()
=>
({
idList
:
copyIdList
}));
}
else
{
message
.
destroy
();
message
.
error
(
'
Failed !
'
,
2
);
}
}
render
()
{
const
{
trainingPlatform
,
record
,
logCollection
}
=
this
.
props
;
const
{
idList
}
=
this
.
state
;
let
isClick
=
false
;
let
isHasParameters
=
true
;
if
(
idList
.
indexOf
(
record
.
id
)
!==
-
1
)
{
isClick
=
true
;
}
if
(
record
.
description
.
parameters
.
error
)
{
isHasParameters
=
false
;
}
...
...
@@ -43,33 +61,42 @@ class OpenRow extends React.Component<OpenRowProps, {}> {
?
record
.
description
.
logPath
:
'
This trial
\'
s log
P
ath are not available.
'
;
'
This trial
\'
s log
p
ath are not available.
'
;
return
(
<
pre
id
=
"description"
className
=
"hyperpar"
>
<
Row
className
=
"openRowContent"
>
<
Row
className
=
"openRowContent hyperpar"
>
<
Tabs
tabPosition
=
"left"
className
=
"card"
>
<
TabPane
tab
=
"Parameters"
key
=
"1"
>
{
isHasParameters
?
<
div
>
<
Row
id
=
"description"
>
<
Row
className
=
"bgHyper"
>
{
isClick
?
<
pre
>
{
JSON
.
stringify
(
openRowDataSource
.
parameters
,
null
,
4
)
}
</
pre
>
:
<
JSONTree
hideRoot
=
{
true
}
shouldExpandNode
=
{
()
=>
true
}
// default expandNode
getItemString
=
{
()
=>
(<
span
/>)
}
// remove the {} items
data
=
{
openRowDataSource
.
parameters
}
/>
}
</
Row
>
<
Row
className
=
"copy"
>
<
Button
onClick
=
{
this
.
copyParams
.
bind
(
this
,
record
)
}
>
Copy as
P
ython
Copy as
p
ython
</
Button
>
</
div
>
</
Row
>
</
Row
>
:
<
div
className
=
"logpath"
>
<
Row
className
=
"logpath"
>
<
span
className
=
"logName"
>
Error:
</
span
>
<
span
className
=
"error"
>
'This trial's parameters are not available.'
</
span
>
</
div
>
</
Row
>
}
</
TabPane
>
<
TabPane
tab
=
"Log"
key
=
"2"
>
...
...
@@ -86,8 +113,7 @@ class OpenRow extends React.Component<OpenRowProps, {}> {
}
</
TabPane
>
</
Tabs
>
</
Row
>
</
pre
>
</
Row
>
);
}
}
...
...
src/webui/src/components/public-child/PaiTrialLog.tsx
View file @
b1dfafff
...
...
@@ -40,7 +40,7 @@ class PaitrialLog extends React.Component<PaitrialLogProps, {}> {
href
=
{
`
${
DOWNLOAD_IP
}
/trial_
${
id
}
.log`
}
style
=
{
{
marginRight
:
10
}
}
>
t
rial stdout
T
rial stdout
</
a
>
<
a
target
=
"_blank"
href
=
{
logStr
.
split
(
'
,
'
)[
1
]
}
>
hdfsLog
</
a
>
</
Row
>
...
...
@@ -48,11 +48,11 @@ class PaitrialLog extends React.Component<PaitrialLogProps, {}> {
<
Row
>
<
LogPathChild
eachLogpath
=
{
logStr
.
split
(
'
,
'
)[
0
]
}
logName
=
"
t
rial stdout:"
logName
=
"
T
rial stdout:"
/>
<
LogPathChild
eachLogpath
=
{
logStr
.
split
(
'
,
'
)[
1
]
}
logName
=
"
hdfsLog
:"
logName
=
"
Log on HDFS
:"
/>
</
Row
>
}
...
...
src/webui/src/components/public-child/TrialLog.tsx
View file @
b1dfafff
...
...
@@ -20,7 +20,7 @@ class TrialLog extends React.Component<TrialLogProps, {}> {
<
div
>
<
LogPathChild
eachLogpath
=
{
logStr
}
logName
=
"Log
P
ath:"
logName
=
"Log
p
ath:"
/>
</
div
>
);
...
...
src/webui/src/components/trial-detail/DefaultMetricPoint.tsx
View file @
b1dfafff
...
...
@@ -63,8 +63,8 @@ class DefaultPoint extends React.Component<DefaultPointProps, DefaultPointState>
},
formatter
:
function
(
data
:
TooltipForAccuracy
)
{
const
result
=
'
<div class="tooldetailAccuracy">
'
+
'
<div>Trial No:
'
+
data
.
data
[
0
]
+
'
</div>
'
+
'
<div>Default
M
etric:
'
+
data
.
data
[
1
]
+
'
</div>
'
+
'
<div>Trial No
.
:
'
+
data
.
data
[
0
]
+
'
</div>
'
+
'
<div>Default
m
etric:
'
+
data
.
data
[
1
]
+
'
</div>
'
+
'
<div>Parameters:
'
+
'
<pre>
'
+
JSON
.
stringify
(
data
.
data
[
2
],
null
,
4
)
+
'
</pre>
'
+
'
</div>
'
+
...
...
@@ -77,7 +77,7 @@ class DefaultPoint extends React.Component<DefaultPointProps, DefaultPointState>
type
:
'
category
'
,
},
yAxis
:
{
name
:
'
Default
M
etric
'
,
name
:
'
Default
m
etric
'
,
type
:
'
value
'
,
},
series
:
[{
...
...
Prev
1
2
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