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
45484bfb
Commit
45484bfb
authored
Nov 29, 2018
by
Lijiao
Committed by
fishyds
Nov 29, 2018
Browse files
Remove intermediate result (#410)
parent
cf3d434f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
34 additions
and
41 deletions
+34
-41
src/webui/package.json
src/webui/package.json
+1
-0
src/webui/src/components/TrialsDetail.tsx
src/webui/src/components/TrialsDetail.tsx
+6
-19
src/webui/src/components/overview/SearchSpace.tsx
src/webui/src/components/overview/SearchSpace.tsx
+12
-3
src/webui/src/components/overview/TrialProfile.tsx
src/webui/src/components/overview/TrialProfile.tsx
+11
-4
src/webui/src/components/trial-detail/TableList.tsx
src/webui/src/components/trial-detail/TableList.tsx
+0
-9
src/webui/src/static/const.ts
src/webui/src/static/const.ts
+4
-0
src/webui/src/static/style/logPath.scss
src/webui/src/static/style/logPath.scss
+0
-4
src/webui/src/static/style/overview.scss
src/webui/src/static/style/overview.scss
+0
-2
No files found.
src/webui/package.json
View file @
45484bfb
...
...
@@ -11,6 +11,7 @@
"react"
:
"^16.4.2"
,
"react-dom"
:
"^16.4.2"
,
"react-json-tree"
:
"^0.11.0"
,
"react-monaco-editor"
:
"^0.22.0"
,
"react-router"
:
"3.2.1"
,
"react-scripts-ts-antd"
:
"2.17.0"
},
...
...
src/webui/src/components/TrialsDetail.tsx
View file @
45484bfb
...
...
@@ -73,9 +73,9 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
enterable
:
true
,
position
:
function
(
point
:
Array
<
number
>
,
data
:
TooltipForAccuracy
)
{
if
(
data
.
data
[
0
]
<
resultList
.
length
/
2
)
{
return
[
point
[
0
],
1
0
];
return
[
point
[
0
],
8
0
];
}
else
{
return
[
point
[
0
]
-
300
,
1
0
];
return
[
point
[
0
]
-
300
,
8
0
];
}
},
formatter
:
function
(
data
:
TooltipForAccuracy
)
{
...
...
@@ -121,15 +121,10 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
drawTableList
=
()
=>
{
axios
.
all
([
axios
.
get
(
`
${
MANAGER_IP
}
/trial-jobs`
),
axios
.
get
(
`
${
MANAGER_IP
}
/metric-data`
)
])
.
then
(
axios
.
spread
((
res
,
res1
)
=>
{
if
(
res
.
status
===
200
&&
res1
.
status
===
200
)
{
axios
.
get
(
`
${
MANAGER_IP
}
/trial-jobs`
)
.
then
(
res
=>
{
if
(
res
.
status
===
200
)
{
const
trialJobs
=
res
.
data
;
const
metricSource
=
res1
.
data
;
const
trialTable
:
Array
<
TableObj
>
=
[];
Object
.
keys
(
trialJobs
).
map
(
item
=>
{
// only succeeded trials have finalMetricData
...
...
@@ -165,14 +160,6 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
desc
.
isLink
=
true
;
}
}
let
mediate
:
Array
<
string
>
=
[];
Object
.
keys
(
metricSource
).
map
(
key
=>
{
const
items
=
metricSource
[
key
];
if
(
items
.
trialJobId
===
id
)
{
mediate
.
push
(
items
.
data
);
}
});
desc
.
intermediate
=
mediate
;
const
acc
=
getFinalResult
(
trialJobs
[
item
].
finalMetricData
);
trialTable
.
push
({
key
:
trialTable
.
length
,
...
...
@@ -191,7 +178,7 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
}));
}
}
})
)
;
});
}
callback
=
(
key
:
string
)
=>
{
...
...
src/webui/src/components/overview/SearchSpace.tsx
View file @
45484bfb
import
*
as
React
from
'
react
'
;
import
MonacoEditor
from
'
react-monaco-editor
'
;
import
{
MONACO
}
from
'
../../static/const
'
;
interface
SearchspaceProps
{
searchSpace
:
object
;
...
...
@@ -14,9 +16,16 @@ class SearchSpace extends React.Component<SearchspaceProps, {}> {
render
()
{
const
{
searchSpace
}
=
this
.
props
;
return
(
<
pre
className
=
"experiment searchSpace"
style
=
{
{
paddingLeft
:
20
}
}
>
{
JSON
.
stringify
(
searchSpace
,
null
,
4
)
}
</
pre
>
<
div
className
=
"searchSpace"
>
<
MonacoEditor
width
=
"100%"
height
=
"380"
language
=
"json"
theme
=
"vs-light"
value
=
{
JSON
.
stringify
(
searchSpace
,
null
,
2
)
}
options
=
{
MONACO
}
/>
</
div
>
);
}
}
...
...
src/webui/src/components/overview/TrialProfile.tsx
View file @
45484bfb
import
*
as
React
from
'
react
'
;
import
{
Experiment
}
from
'
../../static/interface
'
;
import
{
Experiment
}
from
'
../../static/interface
'
;
import
MonacoEditor
from
'
react-monaco-editor
'
;
import
{
MONACO
}
from
'
../../static/const
'
;
interface
TrialInfoProps
{
tiralProInfo
:
Experiment
;
...
...
@@ -25,9 +27,14 @@ class TrialInfo extends React.Component<TrialInfoProps, {}> {
});
return
(
<
div
className
=
"profile"
>
<
pre
>
{
JSON
.
stringify
(
showProInfo
[
0
],
null
,
4
)
}
</
pre
>
<
MonacoEditor
width
=
"100%"
height
=
"386"
language
=
"json"
theme
=
"vs-light"
value
=
{
JSON
.
stringify
(
showProInfo
[
0
],
null
,
2
)
}
options
=
{
MONACO
}
/>
</
div
>
);
}
...
...
src/webui/src/components/trial-detail/TableList.tsx
View file @
45484bfb
...
...
@@ -305,11 +305,6 @@ class TableList extends React.Component<TableListProps, TableListState> {
const
parametersRow
=
{
parameters
:
record
.
description
.
parameters
};
const
intermediate
=
record
.
description
.
intermediate
;
let
showIntermediate
=
''
;
if
(
intermediate
&&
intermediate
.
length
>
0
)
{
showIntermediate
=
intermediate
.
join
(
'
,
'
);
}
let
isLogLink
:
boolean
=
false
;
const
logPathRow
=
record
.
description
.
logPath
;
if
(
record
.
description
.
isLink
!==
undefined
)
{
...
...
@@ -345,10 +340,6 @@ class TableList extends React.Component<TableListProps, TableListState> {
<
span
className
=
"logContent"
>
{
logPathRow
}
</
span
>
</
div
>
}
<
Row
className
=
"intermediate logpath"
>
<
span
className
=
"logName"
>
Intermediate Result:
</
span
>
{
showIntermediate
}
</
Row
>
</
pre
>
);
};
...
...
src/webui/src/static/const.ts
View file @
45484bfb
...
...
@@ -14,3 +14,7 @@ export const CONTROLTYPE = [
'
TRIAL_CONCURRENCY
'
,
'
MAX_EXEC_DURATION
'
];
export
const
MONACO
=
{
readOnly
:
true
,
automaticLayout
:
true
};
src/webui/src/static/style/logPath.scss
View file @
45484bfb
...
...
@@ -20,7 +20,3 @@
text-decoration
:
underline
;
}
.intermediate
{
white-space
:
normal
;
font-size
:
14px
;
}
src/webui/src/static/style/overview.scss
View file @
45484bfb
...
...
@@ -30,7 +30,6 @@
height
:
386px
;
line-height
:
22px
;
font-size
:
14px
;
overflow-y
:
scroll
;
padding
:
15px
0
;
color
:
#212121
;
}
...
...
@@ -46,7 +45,6 @@
}
.profile
{
padding
:
0
20px
;
pre
{
overflow
:
inherit
;
}
...
...
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