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