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
1609e8a4
"src/vscode:/vscode.git/clone" did not exist on "49d5af1002c37e19db071271b7560ae6c64fefd5"
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):
...
@@ -104,6 +104,7 @@ def start_experiment(action, exp_id, config, port, debug, run_mode, url_prefix):
pid
=
proc
.
pid
,
pid
=
proc
.
pid
,
logDir
=
config
.
experiment_working_directory
,
logDir
=
config
.
experiment_working_directory
,
tag
=
[],
tag
=
[],
prefixUrl
=
url_prefix
)
)
_logger
.
info
(
'Setting up...'
)
_logger
.
info
(
'Setting up...'
)
...
...
ts/webui/src/components/managementExp/ExperimentManager.tsx
View file @
1609e8a4
...
@@ -7,7 +7,7 @@ import MessageInfo from '../modals/MessageInfo';
...
@@ -7,7 +7,7 @@ import MessageInfo from '../modals/MessageInfo';
import
{
compareDate
,
filterByStatusOrPlatform
,
getSortedSource
}
from
'
./expFunction
'
;
import
{
compareDate
,
filterByStatusOrPlatform
,
getSortedSource
}
from
'
./expFunction
'
;
import
{
MAXSCREENCOLUMNWIDHT
,
MINSCREENCOLUMNWIDHT
}
from
'
./experimentConst
'
;
import
{
MAXSCREENCOLUMNWIDHT
,
MINSCREENCOLUMNWIDHT
}
from
'
./experimentConst
'
;
import
{
Hearder
}
from
'
./Header
'
;
import
{
Hearder
}
from
'
./Header
'
;
import
Name
Column
from
'
./TrialIdColumn
'
;
import
TrialId
Column
from
'
./TrialIdColumn
'
;
import
FilterBtns
from
'
./FilterBtns
'
;
import
FilterBtns
from
'
./FilterBtns
'
;
import
{
TitleContext
}
from
'
../overview/TitleContext
'
;
import
{
TitleContext
}
from
'
../overview/TitleContext
'
;
import
{
Title
}
from
'
../overview/Title
'
;
import
{
Title
}
from
'
../overview/Title
'
;
...
@@ -194,7 +194,7 @@ class Experiment extends React.Component<{}, ExpListState> {
...
@@ -194,7 +194,7 @@ class Experiment extends React.Component<{}, ExpListState> {
className
:
'
tableHead leftTitle
'
,
className
:
'
tableHead leftTitle
'
,
data
:
'
string
'
,
data
:
'
string
'
,
onColumnClick
:
this
.
onColumnClick
,
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
'
,
name
:
'
Status
'
,
...
...
ts/webui/src/components/managementExp/TrialIdColumn.tsx
View file @
1609e8a4
import
*
as
React
from
'
react
'
;
import
*
as
React
from
'
react
'
;
import
{
Stack
}
from
'
@fluentui/react
'
;
import
{
Stack
}
from
'
@fluentui/react
'
;
import
{
AllExperimentList
}
from
'
../../static/interface
'
;
import
CopyButton
from
'
../public-child/CopyButton
'
;
import
CopyButton
from
'
../public-child/CopyButton
'
;
interface
TrialIdColumnProps
{
interface
TrialIdColumnProps
{
port
:
number
;
item
:
AllExperimentList
;
id
:
string
;
status
:
string
;
}
}
class
TrialIdColumn
extends
React
.
Component
<
TrialIdColumnProps
,
{}
>
{
class
TrialIdColumn
extends
React
.
Component
<
TrialIdColumnProps
,
{}
>
{
...
@@ -14,14 +13,17 @@ class TrialIdColumn extends React.Component<TrialIdColumnProps, {}> {
...
@@ -14,14 +13,17 @@ class TrialIdColumn extends React.Component<TrialIdColumnProps, {}> {
}
}
render
():
React
.
ReactNode
{
render
():
React
.
ReactNode
{
const
{
port
,
id
,
status
}
=
this
.
props
;
const
{
item
}
=
this
.
props
;
const
hostname
=
window
.
location
.
hostname
;
const
hostname
=
window
.
location
.
hostname
;
const
protocol
=
window
.
location
.
protocol
;
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
(
return
(
<
Stack
horizontal
className
=
'ellipsis idCopy'
>
<
Stack
horizontal
className
=
'ellipsis idCopy'
>
{
status
===
'
STOPPED
'
?
(
{
item
.
status
===
'
STOPPED
'
?
(
<
div
className
=
'idColor'
>
{
id
}
</
div
>
<
div
className
=
'idColor'
>
{
item
.
id
}
</
div
>
)
:
(
)
:
(
<
a
<
a
href
=
{
webuiPortal
}
href
=
{
webuiPortal
}
...
@@ -29,13 +31,25 @@ class TrialIdColumn extends React.Component<TrialIdColumnProps, {}> {
...
@@ -29,13 +31,25 @@ class TrialIdColumn extends React.Component<TrialIdColumnProps, {}> {
target
=
'_blank'
target
=
'_blank'
rel
=
'noopener noreferrer'
rel
=
'noopener noreferrer'
>
>
{
id
}
{
item
.
id
}
</
a
>
</
a
>
)
}
)
}
<
CopyButton
value
=
{
id
}
/>
<
CopyButton
value
=
{
item
.
id
}
/>
</
Stack
>
</
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
;
export
default
TrialIdColumn
;
ts/webui/src/static/interface.ts
View file @
1609e8a4
...
@@ -207,6 +207,7 @@ interface AllExperimentList {
...
@@ -207,6 +207,7 @@ interface AllExperimentList {
pid
:
number
;
pid
:
number
;
webuiUrl
:
string
[];
webuiUrl
:
string
[];
logDir
:
string
[];
logDir
:
string
[];
prefixUrl
:
string
;
}
}
interface
Tensorboard
{
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