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
1609e8a4
Unverified
Commit
1609e8a4
authored
Jan 27, 2022
by
Lijiaoa
Committed by
GitHub
Jan 27, 2022
Browse files
[bug fix] Experiment list could not open experiment with prefix (#4511)
parent
6ec6ad58
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
11 deletions
+27
-11
nni/experiment/launcher.py
nni/experiment/launcher.py
+1
-0
ts/webui/src/components/managementExp/ExperimentManager.tsx
ts/webui/src/components/managementExp/ExperimentManager.tsx
+2
-2
ts/webui/src/components/managementExp/TrialIdColumn.tsx
ts/webui/src/components/managementExp/TrialIdColumn.tsx
+23
-9
ts/webui/src/static/interface.ts
ts/webui/src/static/interface.ts
+1
-0
No files found.
nni/experiment/launcher.py
View file @
1609e8a4
...
...
@@ -104,6 +104,7 @@ def start_experiment(action, exp_id, config, port, debug, run_mode, url_prefix):
pid
=
proc
.
pid
,
logDir
=
config
.
experiment_working_directory
,
tag
=
[],
prefixUrl
=
url_prefix
)
_logger
.
info
(
'Setting up...'
)
...
...
ts/webui/src/components/managementExp/ExperimentManager.tsx
View file @
1609e8a4
...
...
@@ -7,7 +7,7 @@ import MessageInfo from '../modals/MessageInfo';
import
{
compareDate
,
filterByStatusOrPlatform
,
getSortedSource
}
from
'
./expFunction
'
;
import
{
MAXSCREENCOLUMNWIDHT
,
MINSCREENCOLUMNWIDHT
}
from
'
./experimentConst
'
;
import
{
Hearder
}
from
'
./Header
'
;
import
Name
Column
from
'
./TrialIdColumn
'
;
import
TrialId
Column
from
'
./TrialIdColumn
'
;
import
FilterBtns
from
'
./FilterBtns
'
;
import
{
TitleContext
}
from
'
../overview/TitleContext
'
;
import
{
Title
}
from
'
../overview/Title
'
;
...
...
@@ -194,7 +194,7 @@ class Experiment extends React.Component<{}, ExpListState> {
className
:
'
tableHead leftTitle
'
,
data
:
'
string
'
,
onColumnClick
:
this
.
onColumnClick
,
onRender
:
(
item
:
any
):
React
.
ReactNode
=>
<
NameColumn
port
=
{
item
.
port
}
status
=
{
item
.
status
}
id
=
{
item
.
id
}
/>
onRender
:
(
item
:
any
):
React
.
ReactNode
=>
<
TrialIdColumn
item
=
{
item
}
/>
},
{
name
:
'
Status
'
,
...
...
ts/webui/src/components/managementExp/TrialIdColumn.tsx
View file @
1609e8a4
import
*
as
React
from
'
react
'
;
import
{
Stack
}
from
'
@fluentui/react
'
;
import
{
AllExperimentList
}
from
'
../../static/interface
'
;
import
CopyButton
from
'
../public-child/CopyButton
'
;
interface
TrialIdColumnProps
{
port
:
number
;
id
:
string
;
status
:
string
;
item
:
AllExperimentList
;
}
class
TrialIdColumn
extends
React
.
Component
<
TrialIdColumnProps
,
{}
>
{
...
...
@@ -14,14 +13,17 @@ class TrialIdColumn extends React.Component<TrialIdColumnProps, {}> {
}
render
():
React
.
ReactNode
{
const
{
port
,
id
,
status
}
=
this
.
props
;
const
{
item
}
=
this
.
props
;
const
hostname
=
window
.
location
.
hostname
;
const
protocol
=
window
.
location
.
protocol
;
const
webuiPortal
=
`
${
protocol
}
//
${
hostname
}
:
${
port
}
/oview`
;
const
webuiPortal
=
item
.
prefixUrl
===
null
?
`
${
protocol
}
//
${
hostname
}
:
${
item
.
port
}
/oview`
:
`
${
protocol
}
//
${
hostname
}
:
${
item
.
port
}
/
${
this
.
formatPrefix
(
item
.
prefixUrl
)}
/oview`
;
return
(
<
Stack
horizontal
className
=
'ellipsis idCopy'
>
{
status
===
'
STOPPED
'
?
(
<
div
className
=
'idColor'
>
{
id
}
</
div
>
{
item
.
status
===
'
STOPPED
'
?
(
<
div
className
=
'idColor'
>
{
item
.
id
}
</
div
>
)
:
(
<
a
href
=
{
webuiPortal
}
...
...
@@ -29,13 +31,25 @@ class TrialIdColumn extends React.Component<TrialIdColumnProps, {}> {
target
=
'_blank'
rel
=
'noopener noreferrer'
>
{
id
}
{
item
.
id
}
</
a
>
)
}
<
CopyButton
value
=
{
id
}
/>
<
CopyButton
value
=
{
item
.
id
}
/>
</
Stack
>
);
}
private
formatPrefix
(
prefix
):
string
{
if
(
prefix
.
startsWith
(
'
/
'
))
{
prefix
=
prefix
.
slice
(
1
);
}
if
(
prefix
.
endsWith
(
'
/
'
))
{
prefix
=
prefix
.
slice
(
0
,
prefix
.
length
-
1
);
}
return
prefix
;
}
}
export
default
TrialIdColumn
;
ts/webui/src/static/interface.ts
View file @
1609e8a4
...
...
@@ -207,6 +207,7 @@ interface AllExperimentList {
pid
:
number
;
webuiUrl
:
string
[];
logDir
:
string
[];
prefixUrl
:
string
;
}
interface
Tensorboard
{
...
...
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