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
cadf3a55
Unverified
Commit
cadf3a55
authored
May 06, 2022
by
Lijiaoa
Committed by
GitHub
May 06, 2022
Browse files
Refactor log components(remove log collection) (#4794)
parent
cbb63c5b
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
269 additions
and
418 deletions
+269
-418
ts/webui/src/components/common/ExpandableDetails.tsx
ts/webui/src/components/common/ExpandableDetails.tsx
+0
-22
ts/webui/src/components/common/ExpandableDetails/ExpandableIndex.tsx
...c/components/common/ExpandableDetails/ExpandableIndex.tsx
+22
-0
ts/webui/src/components/common/ExpandableDetails/OpenRow.tsx
ts/webui/src/components/common/ExpandableDetails/OpenRow.tsx
+168
-0
ts/webui/src/components/common/ExpandableDetails/PaiTrialLog.tsx
...i/src/components/common/ExpandableDetails/PaiTrialLog.tsx
+26
-0
ts/webui/src/components/common/ExpandableDetails/TrialLog.tsx
...ebui/src/components/common/ExpandableDetails/TrialLog.tsx
+27
-0
ts/webui/src/components/common/LogPathChild.tsx
ts/webui/src/components/common/LogPathChild.tsx
+0
-32
ts/webui/src/components/common/OpenRow.tsx
ts/webui/src/components/common/OpenRow.tsx
+0
-190
ts/webui/src/components/common/PaiTrialChild.tsx
ts/webui/src/components/common/PaiTrialChild.tsx
+0
-41
ts/webui/src/components/common/PaiTrialLog.tsx
ts/webui/src/components/common/PaiTrialLog.tsx
+0
-55
ts/webui/src/components/common/TrialLog.tsx
ts/webui/src/components/common/TrialLog.tsx
+0
-25
ts/webui/src/components/experiment/overview/Overview.tsx
ts/webui/src/components/experiment/overview/Overview.tsx
+1
-1
ts/webui/src/components/experiment/overview/table/SuccessTable.tsx
...src/components/experiment/overview/table/SuccessTable.tsx
+1
-1
ts/webui/src/components/experiment/trialdetail/TrialsDetail.tsx
...ui/src/components/experiment/trialdetail/TrialsDetail.tsx
+0
-1
ts/webui/src/components/experiment/trialdetail/table/TableList.tsx
...src/components/experiment/trialdetail/table/TableList.tsx
+2
-2
ts/webui/src/static/interface.ts
ts/webui/src/static/interface.ts
+0
-5
ts/webui/src/static/model/experiment.ts
ts/webui/src/static/model/experiment.ts
+0
-4
ts/webui/src/static/style/common/common.scss
ts/webui/src/static/style/common/common.scss
+3
-2
ts/webui/src/static/style/logPath.scss
ts/webui/src/static/style/logPath.scss
+0
-18
ts/webui/src/static/style/openRow.scss
ts/webui/src/static/style/openRow.scss
+1
-12
ts/webui/src/static/style/table.scss
ts/webui/src/static/style/table.scss
+18
-7
No files found.
ts/webui/src/components/common/ExpandableDetails.tsx
deleted
100644 → 0
View file @
cbb63c5b
import
*
as
React
from
'
react
'
;
import
{
DetailsRow
,
IDetailsRowBaseProps
}
from
'
@fluentui/react
'
;
import
OpenRow
from
'
./OpenRow
'
;
interface
ExpandableDetailsProps
{
detailsProps
:
IDetailsRowBaseProps
;
isExpand
:
boolean
;
}
class
ExpandableDetails
extends
React
.
Component
<
ExpandableDetailsProps
,
{}
>
{
render
():
React
.
ReactNode
{
const
{
detailsProps
,
isExpand
}
=
this
.
props
;
return
(
<
div
>
<
DetailsRow
{
...
detailsProps
}
/>
{
isExpand
&&
<
OpenRow
trialId
=
{
detailsProps
.
item
.
id
}
/>
}
</
div
>
);
}
}
export
default
ExpandableDetails
;
ts/webui/src/components/common/ExpandableDetails/ExpandableIndex.tsx
0 → 100644
View file @
cadf3a55
import
*
as
React
from
'
react
'
;
import
PropTypes
from
'
prop-types
'
;
import
{
DetailsRow
}
from
'
@fluentui/react
'
;
import
OpenRow
from
'
./OpenRow
'
;
import
'
@style/table.scss
'
;
const
ExpandableDetails
=
(
props
):
any
=>
{
const
{
detailsProps
,
isExpand
}
=
props
;
return
(
<
div
>
<
DetailsRow
{
...
detailsProps
}
/>
{
isExpand
&&
<
OpenRow
trialId
=
{
detailsProps
.
item
.
id
}
/>
}
</
div
>
);
};
ExpandableDetails
.
propTypes
=
{
detailsProps
:
PropTypes
.
object
,
isExpand
:
PropTypes
.
bool
};
export
default
ExpandableDetails
;
ts/webui/src/components/common/ExpandableDetails/OpenRow.tsx
0 → 100644
View file @
cadf3a55
import
React
,
{
useState
}
from
'
react
'
;
import
PropTypes
from
'
prop-types
'
;
import
{
Stack
,
PrimaryButton
,
Pivot
,
PivotItem
,
DefaultButton
}
from
'
@fluentui/react
'
;
import
*
as
copy
from
'
copy-to-clipboard
'
;
import
JSONTree
from
'
react-json-tree
'
;
import
{
Trial
}
from
'
@model/trial
'
;
import
{
MANAGER_IP
,
RETIARIIPARAMETERS
}
from
'
@static/const
'
;
import
{
EXPERIMENT
,
TRIALS
}
from
'
@static/datamodel
'
;
import
{
reformatRetiariiParameter
}
from
'
@static/function
'
;
import
PaiTrialLog
from
'
./PaiTrialLog
'
;
import
TrialLog
from
'
./TrialLog
'
;
import
MessageInfo
from
'
../MessageInfo
'
;
import
PanelMonacoEditor
from
'
../PanelMonacoEditor
'
;
import
'
@style/experiment/overview/overview.scss
'
;
/**
* netron URL must be synchronized with ts/nni_manager/rest_server/index.ts`.
* Remember to update it if the value is changed or this file is moved.
**/
const
OpenRow
=
(
props
):
any
=>
{
const
[
typeInfo
,
setTypeInfo
]
=
useState
(
''
);
const
[
info
,
setInfo
]
=
useState
(
''
);
const
[
isHidenInfo
,
setHideninfo
]
=
useState
(
true
);
const
[
showRetiaParamPanel
,
setShowRetiaparamPanel
]
=
useState
(
false
);
const
trialId
=
props
.
trialId
;
const
trial
=
TRIALS
.
getTrial
(
trialId
);
const
logPathRow
=
trial
.
info
.
logPath
||
"
This trial's log path is not available.
"
;
const
originParameters
=
trial
.
description
.
parameters
;
const
hasVisualHyperParams
=
RETIARIIPARAMETERS
in
originParameters
;
const
hideMessageInfo
=
():
void
=>
{
setHideninfo
(
true
);
};
const
hideRetiaParam
=
():
void
=>
{
setShowRetiaparamPanel
(
false
);
};
const
isshowRetiaParamPanel
=
():
void
=>
{
setShowRetiaparamPanel
(
true
);
};
/**
* info: message content
* typeInfo: message type: success | error...
* continuousTime: show time, 2000ms
*/
const
getCopyStatus
=
(
info
:
string
,
typeInfo
:
string
):
void
=>
{
setTypeInfo
(
typeInfo
);
setInfo
(
info
);
setHideninfo
(
false
);
setTimeout
(
hideMessageInfo
,
2000
);
};
const
copyParams
=
(
trial
:
Trial
):
void
=>
{
// get copy parameters
const
params
=
JSON
.
stringify
(
reformatRetiariiParameter
(
trial
.
description
.
parameters
as
any
),
null
,
4
);
if
(
copy
.
default
(
params
))
{
getCopyStatus
(
'
Successfully copy parameters to clipboard in form of python dict !
'
,
'
success
'
);
}
else
{
getCopyStatus
(
'
Failed !
'
,
'
error
'
);
}
};
const
openTrialLog
=
(
filename
:
string
):
void
=>
{
window
.
open
(
`
${
MANAGER_IP
}
/trial-file/
${
props
.
trialId
}
/
${
filename
}
`
);
};
const
openModelOnnx
=
():
void
=>
{
// TODO: netron might need prefix.
window
.
open
(
`/netron/index.html?url=
${
MANAGER_IP
}
/trial-file/
${
props
.
trialId
}
/model.onnx`
);
};
return
(
<
Stack
className
=
'openRow'
>
<
Stack
className
=
'openRowContent'
>
<
Pivot
>
<
PivotItem
headerText
=
'Parameters'
key
=
'1'
itemIcon
=
'TestParameter'
>
{
trial
.
info
.
hyperParameters
!==
undefined
?
(
<
Stack
className
=
'description'
>
<
Stack
className
=
'bgHyper'
>
<
JSONTree
hideRoot
=
{
true
}
shouldExpandNode
=
{
()
=>
true
}
// default expandNode
getItemString
=
{
()
=>
null
}
// remove the {} items
data
=
{
reformatRetiariiParameter
(
originParameters
as
any
)
}
/>
</
Stack
>
<
Stack
horizontal
className
=
'copy'
>
<
PrimaryButton
onClick
=
{
copyParams
.
bind
(
this
,
trial
)
}
text
=
'Copy as json'
styles
=
{
{
root
:
{
width
:
128
,
marginRight
:
10
}
}
}
/>
{
hasVisualHyperParams
&&
(
<
DefaultButton
onClick
=
{
isshowRetiaParamPanel
}
text
=
'Original parameters'
/>
)
}
{
/* copy success | failed message info */
}
{
!
isHidenInfo
&&
<
MessageInfo
typeInfo
=
{
typeInfo
}
info
=
{
info
}
/>
}
{
showRetiaParamPanel
&&
(
<
PanelMonacoEditor
hideConfigPanel
=
{
hideRetiaParam
}
panelName
=
'Retiarii parameters'
panelContent
=
{
JSON
.
stringify
(
originParameters
,
null
,
2
)
}
/>
)
}
</
Stack
>
</
Stack
>
)
:
(
<
Stack
className
=
'logpath'
>
<
span
className
=
'logName'
>
Error:
</
span
>
<
span
className
=
'error'
>
{
`This trial's parameters are not available.'`
}
</
span
>
</
Stack
>
)
}
</
PivotItem
>
<
PivotItem
headerText
=
'Log'
key
=
'2'
itemIcon
=
'M365InvoicingLogo'
>
{
// FIXME: this should not be handled in web UI side
EXPERIMENT
.
trainingServicePlatform
!==
'
local
'
?
(
<
PaiTrialLog
logStr
=
{
logPathRow
}
/>
)
:
(
<
div
>
<
TrialLog
logStr
=
{
logPathRow
}
logName
=
'LogPath:'
/>
{
/* view trial log */
}
<
div
className
=
'copy'
style
=
{
{
marginTop
:
4
}
}
>
<
PrimaryButton
onClick
=
{
openTrialLog
.
bind
(
this
,
'
trial.log
'
)
}
text
=
'View trial log'
/>
<
PrimaryButton
onClick
=
{
openTrialLog
.
bind
(
this
,
'
stderr
'
)
}
text
=
'View trial error'
styles
=
{
{
root
:
{
marginLeft
:
15
}
}
}
/>
<
PrimaryButton
onClick
=
{
openTrialLog
.
bind
(
this
,
'
stdout
'
)
}
text
=
'View trial stdout'
styles
=
{
{
root
:
{
marginLeft
:
15
}
}
}
/>
</
div
>
</
div
>
)
}
</
PivotItem
>
{
EXPERIMENT
.
metadata
.
tag
.
includes
(
'
retiarii
'
)
?
(
<
PivotItem
headerText
=
'Visualization'
key
=
'3'
itemIcon
=
'FlowChart'
>
<
div
id
=
'visualization'
>
<
div
id
=
'visualizationText'
>
Visualize models with 3rd-party tools.
</
div
>
<
PrimaryButton
onClick
=
{
openModelOnnx
.
bind
(
this
)
}
text
=
'Netron'
styles
=
{
{
root
:
{
marginLeft
:
15
}
}
}
/>
</
div
>
</
PivotItem
>
)
:
null
}
</
Pivot
>
</
Stack
>
</
Stack
>
);
};
OpenRow
.
propTypes
=
{
trialId
:
PropTypes
.
string
};
export
default
OpenRow
;
ts/webui/src/components/common/ExpandableDetails/PaiTrialLog.tsx
0 → 100644
View file @
cadf3a55
import
*
as
React
from
'
react
'
;
import
PropTypes
from
'
prop-types
'
;
import
TrialLog
from
'
./TrialLog
'
;
const
PaitrialLog
=
(
props
):
any
=>
{
const
{
logStr
}
=
props
;
const
isHasNFSLog
=
logStr
.
indexOf
(
'
,
'
)
!==
-
1
?
true
:
false
;
return
(
<
div
>
{
isHasNFSLog
?
(
<
div
>
<
TrialLog
logStr
=
{
logStr
.
split
(
'
,
'
)[
0
]
}
logName
=
'Trial stdout:'
/>
<
TrialLog
logStr
=
{
logStr
.
split
(
'
,
'
)[
1
]
}
logName
=
'Log on NFS:'
/>
</
div
>
)
:
(
<
TrialLog
logStr
=
{
logStr
}
logName
=
'Trial stdout:'
/>
)
}
</
div
>
);
};
PaitrialLog
.
propTypes
=
{
logStr
:
PropTypes
.
string
};
export
default
PaitrialLog
;
ts/webui/src/components/common/ExpandableDetails/TrialLog.tsx
0 → 100644
View file @
cadf3a55
import
*
as
React
from
'
react
'
;
import
PropTypes
from
'
prop-types
'
;
const
TrialLog
=
(
props
):
any
=>
{
const
{
logStr
,
logName
}
=
props
;
const
isHyperlink
=
logStr
.
toLowerCase
().
startsWith
(
'
http
'
);
return
(
<
div
className
=
'logpath'
>
<
span
className
=
'logName'
>
{
logName
}
</
span
>
{
isHyperlink
?
(
<
a
className
=
'link'
rel
=
'noopener noreferrer'
href
=
{
logStr
}
target
=
'_blank'
>
{
logStr
}
</
a
>
)
:
(
<
span
className
=
'fontColor333'
>
{
logStr
}
</
span
>
)
}
</
div
>
);
};
TrialLog
.
propTypes
=
{
logStr
:
PropTypes
.
string
,
logName
:
PropTypes
.
string
};
export
default
TrialLog
;
ts/webui/src/components/common/LogPathChild.tsx
deleted
100644 → 0
View file @
cbb63c5b
import
*
as
React
from
'
react
'
;
interface
LogpathChildProps
{
eachLogpath
:
string
;
logName
:
string
;
}
class
LogPathChild
extends
React
.
Component
<
LogpathChildProps
,
{}
>
{
constructor
(
props
:
LogpathChildProps
)
{
super
(
props
);
}
render
():
React
.
ReactNode
{
const
{
eachLogpath
,
logName
}
=
this
.
props
;
const
isLink
=
/^http/gi
.
test
(
eachLogpath
);
return
(
<
div
className
=
'logpath'
>
<
span
className
=
'logName'
>
{
logName
}
</
span
>
{
isLink
?
(
<
a
className
=
'fontColor333 logHref'
rel
=
'noopener noreferrer'
href
=
{
eachLogpath
}
target
=
'_blank'
>
{
eachLogpath
}
</
a
>
)
:
(
<
span
className
=
'fontColor333'
>
{
eachLogpath
}
</
span
>
)
}
</
div
>
);
}
}
export
default
LogPathChild
;
ts/webui/src/components/common/OpenRow.tsx
deleted
100644 → 0
View file @
cbb63c5b
import
*
as
React
from
'
react
'
;
import
*
as
copy
from
'
copy-to-clipboard
'
;
import
{
Stack
,
PrimaryButton
,
Pivot
,
PivotItem
,
DefaultButton
}
from
'
@fluentui/react
'
;
import
JSONTree
from
'
react-json-tree
'
;
import
{
Trial
}
from
'
@model/trial
'
;
import
{
MANAGER_IP
,
RETIARIIPARAMETERS
}
from
'
@static/const
'
;
import
{
EXPERIMENT
,
TRIALS
}
from
'
@static/datamodel
'
;
import
{
reformatRetiariiParameter
}
from
'
@static/function
'
;
import
PaiTrialLog
from
'
./PaiTrialLog
'
;
import
TrialLog
from
'
./TrialLog
'
;
import
MessageInfo
from
'
./MessageInfo
'
;
import
PanelMonacoEditor
from
'
./PanelMonacoEditor
'
;
import
'
@style/experiment/overview/overview.scss
'
;
import
'
@style/openRow.scss
'
;
/**
* netron URL must be synchronized with ts/nni_manager/rest_server/index.ts`.
* Remember to update it if the value is changed or this file is moved.
**/
interface
OpenRowProps
{
trialId
:
string
;
}
interface
OpenRowState
{
typeInfo
:
string
;
info
:
string
;
isHidenInfo
:
boolean
;
showRetiaParamPanel
:
boolean
;
}
class
OpenRow
extends
React
.
Component
<
OpenRowProps
,
OpenRowState
>
{
constructor
(
props
:
OpenRowProps
)
{
super
(
props
);
this
.
state
=
{
typeInfo
:
''
,
info
:
''
,
isHidenInfo
:
true
,
showRetiaParamPanel
:
false
};
}
hideMessageInfo
=
():
void
=>
{
this
.
setState
(()
=>
({
isHidenInfo
:
true
}));
};
hideRetiaParam
=
():
void
=>
{
this
.
setState
(()
=>
({
showRetiaParamPanel
:
false
}));
};
isshowRetiaParamPanel
=
():
void
=>
{
this
.
setState
(()
=>
({
showRetiaParamPanel
:
true
}));
};
/**
* info: message content
* typeInfo: message type: success | error...
* continuousTime: show time, 2000ms
*/
getCopyStatus
=
(
info
:
string
,
typeInfo
:
string
):
void
=>
{
this
.
setState
(()
=>
({
info
,
typeInfo
,
isHidenInfo
:
false
}));
setTimeout
(
this
.
hideMessageInfo
,
2000
);
};
copyParams
=
(
trial
:
Trial
):
void
=>
{
// get copy parameters
const
params
=
JSON
.
stringify
(
reformatRetiariiParameter
(
trial
.
description
.
parameters
as
any
),
null
,
4
);
if
(
copy
.
default
(
params
))
{
this
.
getCopyStatus
(
'
Success copy parameters to clipboard in form of python dict !
'
,
'
success
'
);
}
else
{
this
.
getCopyStatus
(
'
Failed !
'
,
'
error
'
);
}
};
openTrialLog
=
(
filename
:
string
):
void
=>
{
window
.
open
(
`
${
MANAGER_IP
}
/trial-file/
${
this
.
props
.
trialId
}
/
${
filename
}
`
);
};
openModelOnnx
=
():
void
=>
{
// TODO: netron might need prefix.
window
.
open
(
`/netron/index.html?url=
${
MANAGER_IP
}
/trial-file/
${
this
.
props
.
trialId
}
/model.onnx`
);
};
render
():
React
.
ReactNode
{
const
{
isHidenInfo
,
typeInfo
,
info
,
showRetiaParamPanel
}
=
this
.
state
;
const
trialId
=
this
.
props
.
trialId
;
const
trial
=
TRIALS
.
getTrial
(
trialId
);
const
logPathRow
=
trial
.
info
.
logPath
||
"
This trial's log path is not available.
"
;
const
originParameters
=
trial
.
description
.
parameters
;
const
hasVisualHyperParams
=
RETIARIIPARAMETERS
in
originParameters
;
return
(
<
Stack
className
=
'openRow'
>
<
Stack
className
=
'openRowContent'
>
<
Pivot
>
<
PivotItem
headerText
=
'Parameters'
key
=
'1'
itemIcon
=
'TestParameter'
>
{
trial
.
info
.
hyperParameters
!==
undefined
?
(
<
Stack
id
=
'description'
>
<
Stack
className
=
'bgHyper'
>
<
JSONTree
hideRoot
=
{
true
}
shouldExpandNode
=
{
():
boolean
=>
true
}
// default expandNode
getItemString
=
{
():
null
=>
null
}
// remove the {} items
data
=
{
reformatRetiariiParameter
(
originParameters
as
any
)
}
/>
</
Stack
>
<
Stack
horizontal
className
=
'copy'
>
<
PrimaryButton
onClick
=
{
this
.
copyParams
.
bind
(
this
,
trial
)
}
text
=
'Copy as json'
styles
=
{
{
root
:
{
width
:
128
,
marginRight
:
10
}
}
}
/>
{
hasVisualHyperParams
&&
(
<
DefaultButton
onClick
=
{
this
.
isshowRetiaParamPanel
}
text
=
'Original parameters'
/>
)
}
{
/* copy success | failed message info */
}
{
!
isHidenInfo
&&
<
MessageInfo
typeInfo
=
{
typeInfo
}
info
=
{
info
}
/>
}
{
showRetiaParamPanel
&&
(
<
PanelMonacoEditor
hideConfigPanel
=
{
this
.
hideRetiaParam
}
panelName
=
'Retiarii parameters'
panelContent
=
{
JSON
.
stringify
(
originParameters
,
null
,
2
)
}
/>
)
}
</
Stack
>
</
Stack
>
)
:
(
<
Stack
className
=
'logpath'
>
<
span
className
=
'logName'
>
Error:
</
span
>
<
span
className
=
'error'
>
{
`This trial's parameters are not available.'`
}
</
span
>
</
Stack
>
)
}
</
PivotItem
>
<
PivotItem
headerText
=
'Log'
key
=
'2'
itemIcon
=
'M365InvoicingLogo'
>
{
// FIXME: this should not be handled in web UI side
EXPERIMENT
.
trainingServicePlatform
!==
'
local
'
?
(
<
PaiTrialLog
logStr
=
{
logPathRow
}
id
=
{
trialId
}
logCollection
=
{
EXPERIMENT
.
logCollectionEnabled
}
/>
)
:
(
<
div
>
<
TrialLog
logStr
=
{
logPathRow
}
id
=
{
trialId
}
/>
{
/* view each trial log in drawer*/
}
<
div
id
=
'trialog'
>
<
div
className
=
'copy'
style
=
{
{
marginTop
:
15
}
}
>
<
PrimaryButton
onClick
=
{
this
.
openTrialLog
.
bind
(
this
,
'
trial.log
'
)
}
text
=
'View trial log'
/>
<
PrimaryButton
onClick
=
{
this
.
openTrialLog
.
bind
(
this
,
'
stderr
'
)
}
text
=
'View trial error'
styles
=
{
{
root
:
{
marginLeft
:
15
}
}
}
/>
<
PrimaryButton
onClick
=
{
this
.
openTrialLog
.
bind
(
this
,
'
stdout
'
)
}
text
=
'View trial stdout'
styles
=
{
{
root
:
{
marginLeft
:
15
}
}
}
/>
</
div
>
</
div
>
</
div
>
)
}
</
PivotItem
>
{
EXPERIMENT
.
metadata
.
tag
.
includes
(
'
retiarii
'
)
?
(
<
PivotItem
headerText
=
'Visualization'
key
=
'3'
itemIcon
=
'FlowChart'
>
<
div
id
=
'visualization'
>
<
div
id
=
'visualizationText'
>
Visualize models with 3rd-party tools.
</
div
>
<
PrimaryButton
onClick
=
{
this
.
openModelOnnx
.
bind
(
this
)
}
text
=
'Netron'
styles
=
{
{
root
:
{
marginLeft
:
15
}
}
}
/>
</
div
>
</
PivotItem
>
)
:
null
}
</
Pivot
>
</
Stack
>
</
Stack
>
);
}
}
export
default
OpenRow
;
ts/webui/src/components/common/PaiTrialChild.tsx
deleted
100644 → 0
View file @
cbb63c5b
import
*
as
React
from
'
react
'
;
import
{
DOWNLOAD_IP
}
from
'
@static/const
'
;
import
LogPathChild
from
'
./LogPathChild
'
;
interface
PaiTrialChildProps
{
logString
:
string
;
id
:
string
;
logCollect
:
boolean
;
}
class
PaiTrialChild
extends
React
.
Component
<
PaiTrialChildProps
,
{}
>
{
constructor
(
props
:
PaiTrialChildProps
)
{
super
(
props
);
}
render
():
React
.
ReactNode
{
const
{
logString
,
id
,
logCollect
}
=
this
.
props
;
return
(
<
div
>
{
logString
===
''
?
null
:
(
<
div
>
{
logCollect
?
(
<
a
target
=
'_blank'
rel
=
'noopener noreferrer'
href
=
{
`
${
DOWNLOAD_IP
}
/trial_
${
id
}
.log`
}
style
=
{
{
marginRight
:
10
}
}
>
Trial stdout
</
a
>
)
:
(
<
LogPathChild
eachLogpath
=
{
logString
}
logName
=
'Trial stdout:'
/>
)
}
</
div
>
)
}
</
div
>
);
}
}
export
default
PaiTrialChild
;
ts/webui/src/components/common/PaiTrialLog.tsx
deleted
100644 → 0
View file @
cbb63c5b
import
*
as
React
from
'
react
'
;
import
{
DOWNLOAD_IP
}
from
'
@static/const
'
;
import
PaiTrialChild
from
'
./PaiTrialChild
'
;
import
LogPathChild
from
'
./LogPathChild
'
;
interface
PaitrialLogProps
{
logStr
:
string
;
id
:
string
;
logCollection
:
boolean
;
}
class
PaitrialLog
extends
React
.
Component
<
PaitrialLogProps
,
{}
>
{
constructor
(
props
:
PaitrialLogProps
)
{
super
(
props
);
}
render
():
React
.
ReactNode
{
const
{
logStr
,
id
,
logCollection
}
=
this
.
props
;
const
isTwopath
=
logStr
.
indexOf
(
'
,
'
)
!==
-
1
?
true
:
false
;
return
(
<
div
>
<
div
>
{
isTwopath
?
(
<
div
>
{
logCollection
?
(
<
div
>
<
a
target
=
'_blank'
rel
=
'noopener noreferrer'
href
=
{
`
${
DOWNLOAD_IP
}
/trial_
${
id
}
.log`
}
style
=
{
{
marginRight
:
10
}
}
>
Trial stdout
</
a
>
<
a
target
=
'_blank'
rel
=
'noopener noreferrer'
href
=
{
logStr
.
split
(
'
,
'
)[
1
]
}
>
NFS log
</
a
>
</
div
>
)
:
(
<
div
>
<
LogPathChild
eachLogpath
=
{
logStr
.
split
(
'
,
'
)[
0
]
}
logName
=
'Trial stdout:'
/>
<
LogPathChild
eachLogpath
=
{
logStr
.
split
(
'
,
'
)[
1
]
}
logName
=
'Log on NFS:'
/>
</
div
>
)
}
</
div
>
)
:
(
<
PaiTrialChild
logString
=
{
logStr
}
id
=
{
id
}
logCollect
=
{
logCollection
}
/>
)
}
</
div
>
</
div
>
);
}
}
export
default
PaitrialLog
;
ts/webui/src/components/common/TrialLog.tsx
deleted
100644 → 0
View file @
cbb63c5b
import
*
as
React
from
'
react
'
;
import
LogPathChild
from
'
./LogPathChild
'
;
interface
TrialLogProps
{
logStr
:
string
;
id
:
string
;
}
class
TrialLog
extends
React
.
Component
<
TrialLogProps
,
{}
>
{
constructor
(
props
:
TrialLogProps
)
{
super
(
props
);
}
render
():
React
.
ReactNode
{
const
{
logStr
}
=
this
.
props
;
return
(
<
div
>
<
LogPathChild
eachLogpath
=
{
logStr
}
logName
=
'Log path:'
/>
</
div
>
);
}
}
export
default
TrialLog
;
ts/webui/src/components/experiment/overview/Overview.tsx
View file @
cadf3a55
...
@@ -16,7 +16,7 @@ import { TitleContext } from './TitleContext';
...
@@ -16,7 +16,7 @@ import { TitleContext } from './TitleContext';
import
{
itemStyleSucceed
,
entriesOption
}
from
'
./overviewConst
'
;
import
{
itemStyleSucceed
,
entriesOption
}
from
'
./overviewConst
'
;
import
'
@style/experiment/overview/overview.scss
'
;
import
'
@style/experiment/overview/overview.scss
'
;
import
'
@style/experiment/overview/topTrial.scss
'
;
import
'
@style/experiment/overview/topTrial.scss
'
;
import
'
@style/
logPath
.scss
'
;
import
'
@style/
table
.scss
'
;
/**
/**
* single experiment
* single experiment
...
...
ts/webui/src/components/experiment/overview/table/SuccessTable.tsx
View file @
cadf3a55
...
@@ -14,7 +14,7 @@ import {
...
@@ -14,7 +14,7 @@ import {
ScrollbarVisibility
ScrollbarVisibility
}
from
'
@fluentui/react
'
;
}
from
'
@fluentui/react
'
;
import
DefaultMetric
from
'
./DefaultMetric
'
;
import
DefaultMetric
from
'
./DefaultMetric
'
;
import
OpenRow
from
'
@components/common/OpenRow
'
;
import
OpenRow
from
'
@
/
components/common/
ExpandableDetails/
OpenRow
'
;
import
CopyButton
from
'
@components/common/CopyButton
'
;
import
CopyButton
from
'
@components/common/CopyButton
'
;
import
{
convertDuration
,
copyAndSort
}
from
'
@static/function
'
;
import
{
convertDuration
,
copyAndSort
}
from
'
@static/function
'
;
import
{
TRIALS
}
from
'
@static/datamodel
'
;
import
{
TRIALS
}
from
'
@static/datamodel
'
;
...
...
ts/webui/src/components/experiment/trialdetail/TrialsDetail.tsx
View file @
cadf3a55
...
@@ -8,7 +8,6 @@ import Para from './chart/Para';
...
@@ -8,7 +8,6 @@ import Para from './chart/Para';
import
Intermediate
from
'
./chart/Intermediate
'
;
import
Intermediate
from
'
./chart/Intermediate
'
;
import
TableList
from
'
./table/TableList
'
;
import
TableList
from
'
./table/TableList
'
;
import
'
@style/button.scss
'
;
import
'
@style/button.scss
'
;
import
'
@style/logPath.scss
'
;
import
'
@style/openRow.scss
'
;
import
'
@style/openRow.scss
'
;
import
'
@style/pagination.scss
'
;
import
'
@style/pagination.scss
'
;
import
'
@style/experiment/overview/overviewTitle.scss
'
;
import
'
@style/experiment/overview/overviewTitle.scss
'
;
...
...
ts/webui/src/components/experiment/trialdetail/table/TableList.tsx
View file @
cadf3a55
...
@@ -23,14 +23,14 @@ import {
...
@@ -23,14 +23,14 @@ import {
}
from
'
@static/function
'
;
}
from
'
@static/function
'
;
import
{
TableObj
,
SortInfo
,
SearchItems
}
from
'
@static/interface
'
;
import
{
TableObj
,
SortInfo
,
SearchItems
}
from
'
@static/interface
'
;
import
{
blocked
,
copy
,
LineChart
,
tableListIcon
}
from
'
@components/fluent/Icon
'
;
import
{
blocked
,
copy
,
LineChart
,
tableListIcon
}
from
'
@components/fluent/Icon
'
;
import
Search
from
'
./tableFunction/search/Search
'
;
import
Customize
from
'
./tableFunction/CustomizedTrial
'
;
import
Customize
from
'
./tableFunction/CustomizedTrial
'
;
import
TensorboardUI
from
'
./tableFunction/tensorboard/TensorboardUI
'
;
import
TensorboardUI
from
'
./tableFunction/tensorboard/TensorboardUI
'
;
import
Search
from
'
./tableFunction/search/Search
'
;
import
ExpandableDetails
from
'
@components/common/ExpandableDetails/ExpandableIndex
'
;
import
ChangeColumnComponent
from
'
../ChangeColumnComponent
'
;
import
ChangeColumnComponent
from
'
../ChangeColumnComponent
'
;
import
Compare
from
'
./tableFunction/Compare
'
;
import
Compare
from
'
./tableFunction/Compare
'
;
import
KillJobIndex
from
'
./tableFunction/killJob/KillJobIndex
'
;
import
KillJobIndex
from
'
./tableFunction/killJob/KillJobIndex
'
;
import
{
getTrialsBySearchFilters
}
from
'
./tableFunction/search/searchFunction
'
;
import
{
getTrialsBySearchFilters
}
from
'
./tableFunction/search/searchFunction
'
;
import
ExpandableDetails
from
'
@components/common/ExpandableDetails
'
;
import
PaginationTable
from
'
@components/common/PaginationTable
'
;
import
PaginationTable
from
'
@components/common/PaginationTable
'
;
import
CopyButton
from
'
@components/common/CopyButton
'
;
import
CopyButton
from
'
@components/common/CopyButton
'
;
...
...
ts/webui/src/static/interface.ts
View file @
cadf3a55
...
@@ -147,13 +147,8 @@ interface TrialJobInfo {
...
@@ -147,13 +147,8 @@ interface TrialJobInfo {
hyperParameters
?:
string
[];
hyperParameters
?:
string
[];
logPath
?:
string
;
logPath
?:
string
;
finalMetricData
?:
MetricDataRecord
[];
finalMetricData
?:
MetricDataRecord
[];
stderrPath
?:
string
;
}
}
//interface ClusterItem {
// command?: string;
//}
interface
ExperimentProfile
{
interface
ExperimentProfile
{
params
:
ExperimentConfig
;
params
:
ExperimentConfig
;
id
:
string
;
id
:
string
;
...
...
ts/webui/src/static/model/experiment.ts
View file @
cadf3a55
...
@@ -182,10 +182,6 @@ class Experiment {
...
@@ -182,10 +182,6 @@ class Experiment {
return
new
SearchSpace
(
''
,
''
,
this
.
searchSpace
);
return
new
SearchSpace
(
''
,
''
,
this
.
searchSpace
);
}
}
get
logCollectionEnabled
():
boolean
{
return
false
;
}
get
status
():
string
{
get
status
():
string
{
if
(
!
this
.
statusField
)
{
if
(
!
this
.
statusField
)
{
// throw Error('Experiment status not initialized');
// throw Error('Experiment status not initialized');
...
...
ts/webui/src/static/style/common/common.scss
View file @
cadf3a55
...
@@ -7,17 +7,18 @@ $themeBlue: #0071bc;
...
@@ -7,17 +7,18 @@ $themeBlue: #0071bc;
}
}
.link
{
.link
{
color
:
$themeBlue
;
outline
:
none
;
outline
:
none
;
text-decoration
:
none
;
text-decoration
:
none
;
&
:hover
{
&
:hover
{
color
:
#0071bc
!
important
;
color
:
$themeBlue
;
text-decoration
:
underline
;
text-decoration
:
underline
;
}
}
&
:active
,
&
:active
,
&
:visited
{
&
:visited
{
color
:
#0071bc
;
color
:
$themeBlue
;
}
}
}
}
...
...
ts/webui/src/static/style/logPath.scss
deleted
100644 → 0
View file @
cbb63c5b
.logpath
{
margin-left
:
10px
;
font-size
:
14px
;
.logName
{
color
:
#268bd2
;
margin-right
:
5px
;
}
.error
{
color
:
#cb4b16
;
}
}
.logHref
:hover
{
color
:
blue
;
text-decoration
:
underline
;
}
ts/webui/src/static/style/openRow.scss
View file @
cadf3a55
...
@@ -17,18 +17,7 @@ $bgColor: #f2f2f2;
...
@@ -17,18 +17,7 @@ $bgColor: #f2f2f2;
}
}
}
}
.trialLog
{
.description
{
white-space
:
normal
;
color
:
#212121
;
}
#trialLogContent
{
.logcontent
{
height
:
100%
;
}
}
#description
{
padding
:
0
10px
;
padding
:
0
10px
;
.bgHyper
ul
{
.bgHyper
ul
{
...
...
ts/webui/src/static/style/table.scss
View file @
cadf3a55
/* react-json-tree background */
/* react-json-tree background */
#
description
ul
,
.
description
ul
,
#allList
ul
{
#allList
ul
{
background
:
none
!
important
;
background
:
none
;
}
}
.tabScroll
{
.tabScroll
{
...
@@ -46,11 +46,6 @@
...
@@ -46,11 +46,6 @@
}
}
}
}
/* office-fabric-ui */
.ms-DetailsRow
{
height
:
30px
;
}
.detail-table
{
.detail-table
{
padding-top
:
5px
;
padding-top
:
5px
;
}
}
...
@@ -78,3 +73,19 @@ $checkboxwidth: 17px;
...
@@ -78,3 +73,19 @@ $checkboxwidth: 17px;
}
}
}
}
}
}
/* trial table: open row style */
.logpath
{
margin
:
10px
0
10px
10px
;
font-size
:
14px
;
.logName
{
color
:
#268bd2
;
margin-right
:
5px
;
}
.error
{
color
:
#cb4b16
;
}
}
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