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
00ddf3aa
Unverified
Commit
00ddf3aa
authored
Jul 07, 2020
by
Lijiaoa
Committed by
GitHub
Jul 07, 2020
Browse files
[bug bash] Rm default key from table column(because had "Default" column) (#2635)
parent
9c4a1c74
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
10 deletions
+24
-10
src/webui/src/components/trial-detail/TableList.tsx
src/webui/src/components/trial-detail/TableList.tsx
+11
-9
src/webui/src/static/model/experiment.ts
src/webui/src/static/model/experiment.ts
+13
-1
No files found.
src/webui/src/components/trial-detail/TableList.tsx
View file @
00ddf3aa
...
@@ -414,6 +414,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
...
@@ -414,6 +414,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
const
tableSource
:
Array
<
TableRecord
>
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
props
.
tableSource
));
const
tableSource
:
Array
<
TableRecord
>
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
props
.
tableSource
));
// parameter as table column
// parameter as table column
const
parameterStr
:
string
[]
=
[];
const
parameterStr
:
string
[]
=
[];
if
(
!
EXPERIMENT
.
isNestedExp
())
{
if
(
tableSource
.
length
>
0
)
{
if
(
tableSource
.
length
>
0
)
{
const
trialMess
=
TRIALS
.
getTrial
(
tableSource
[
0
].
id
);
const
trialMess
=
TRIALS
.
getTrial
(
tableSource
[
0
].
id
);
const
trial
=
trialMess
.
description
.
parameters
;
const
trial
=
trialMess
.
description
.
parameters
;
...
@@ -422,9 +423,10 @@ class TableList extends React.Component<TableListProps, TableListState> {
...
@@ -422,9 +423,10 @@ class TableList extends React.Component<TableListProps, TableListState> {
parameterStr
.
push
(
`
${
value
}
(search space)`
);
parameterStr
.
push
(
`
${
value
}
(search space)`
);
});
});
}
}
}
// concat trial all final keys and remove dup "default" val, return list
// concat trial all final keys and remove dup "default" val, return list
return
(
COLUMNPro
.
concat
(
parameterStr
)).
concat
(
Array
.
from
(
new
Set
(
TRIALS
.
finalKeys
()))
);
const
finalKeysList
=
TRIALS
.
finalKeys
().
filter
(
item
=>
item
!==
'
default
'
);
return
(
COLUMNPro
.
concat
(
parameterStr
)).
concat
(
finalKeysList
);
}
}
// get IColumn[]
// get IColumn[]
...
...
src/webui/src/static/model/experiment.ts
View file @
00ddf3aa
...
@@ -14,6 +14,7 @@ function compareProfiles(profile1?: ExperimentProfile, profile2?: ExperimentProf
...
@@ -14,6 +14,7 @@ function compareProfiles(profile1?: ExperimentProfile, profile2?: ExperimentProf
class
Experiment
{
class
Experiment
{
private
profileField
?:
ExperimentProfile
=
undefined
;
private
profileField
?:
ExperimentProfile
=
undefined
;
private
statusField
?:
NNIManagerStatus
=
undefined
;
private
statusField
?:
NNIManagerStatus
=
undefined
;
private
isNestedExperiment
:
boolean
=
false
;
private
isexperimentError
:
boolean
=
false
;
private
isexperimentError
:
boolean
=
false
;
private
experimentErrorMessage
:
string
=
''
;
private
experimentErrorMessage
:
string
=
''
;
private
isStatusError
:
boolean
=
false
;
private
isStatusError
:
boolean
=
false
;
...
@@ -31,6 +32,10 @@ class Experiment {
...
@@ -31,6 +32,10 @@ class Experiment {
}
}
}
}
public
isNestedExp
():
boolean
{
return
this
.
isNestedExperiment
;
}
public
experimentError
():
boolean
{
public
experimentError
():
boolean
{
return
this
.
isexperimentError
;
return
this
.
isexperimentError
;
}
}
...
@@ -114,7 +119,14 @@ class Experiment {
...
@@ -114,7 +119,14 @@ class Experiment {
}
}
get
searchSpace
():
object
{
get
searchSpace
():
object
{
return
JSON
.
parse
(
this
.
profile
.
params
.
searchSpace
);
const
result
=
JSON
.
parse
(
this
.
profile
.
params
.
searchSpace
);
for
(
const
item
in
result
)
{
if
(
result
[
item
].
_value
&&
typeof
result
[
item
].
_value
[
0
]
===
'
object
'
)
{
this
.
isNestedExperiment
=
true
;
break
;
}
}
return
result
;
}
}
get
logCollectionEnabled
():
boolean
{
get
logCollectionEnabled
():
boolean
{
...
...
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