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
fcc6c78c
Unverified
Commit
fcc6c78c
authored
Apr 22, 2021
by
liuzhe-lz
Committed by
GitHub
Apr 22, 2021
Browse files
Fix k8s webui (#3565)
parent
019eef75
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
nni/__main__.py
nni/__main__.py
+2
-1
ts/webui/src/static/model/experiment.ts
ts/webui/src/static/model/experiment.ts
+9
-3
No files found.
nni/__main__.py
View file @
fcc6c78c
...
@@ -33,10 +33,11 @@ def main():
...
@@ -33,10 +33,11 @@ def main():
enable_multi_thread
()
enable_multi_thread
()
if
'trainingServicePlatform'
in
exp_params
:
# config schema is v1
if
'trainingServicePlatform'
in
exp_params
:
# config schema is v1
from
types
import
SimpleNamespace
from
.experiment.config.convert
import
convert_algo
from
.experiment.config.convert
import
convert_algo
for
algo_type
in
[
'tuner'
,
'assessor'
,
'advisor'
]:
for
algo_type
in
[
'tuner'
,
'assessor'
,
'advisor'
]:
if
algo_type
in
exp_params
:
if
algo_type
in
exp_params
:
convert_algo
(
algo_type
,
exp_params
,
exp_params
)
exp_params
[
algo_type
]
=
convert_algo
(
algo_type
,
exp_params
,
SimpleNamespace
()).
json
(
)
if
exp_params
.
get
(
'advisor'
)
is
not
None
:
if
exp_params
.
get
(
'advisor'
)
is
not
None
:
# advisor is enabled and starts to run
# advisor is enabled and starts to run
...
...
ts/webui/src/static/model/experiment.ts
View file @
fcc6c78c
...
@@ -116,12 +116,12 @@ class Experiment {
...
@@ -116,12 +116,12 @@ class Experiment {
}
}
get
maxExperimentDurationSeconds
():
number
{
get
maxExperimentDurationSeconds
():
number
{
const
value
=
this
.
config
.
maxExperimentDuration
;
const
value
=
this
.
config
.
maxExperimentDuration
||
(
this
.
config
as
any
).
maxExecDuration
;
return
value
===
undefined
?
Infinity
:
toSeconds
(
value
);
return
value
===
undefined
?
Infinity
:
toSeconds
(
value
);
}
}
get
maxTrialNumber
():
number
{
get
maxTrialNumber
():
number
{
const
value
=
this
.
config
.
maxTrialNumber
;
const
value
=
this
.
config
.
maxTrialNumber
||
(
this
.
config
as
any
).
maxTrialNum
;
return
value
===
undefined
?
Infinity
:
value
;
return
value
===
undefined
?
Infinity
:
value
;
}
}
...
@@ -139,7 +139,13 @@ class Experiment {
...
@@ -139,7 +139,13 @@ class Experiment {
}
}
get
trainingServicePlatform
():
string
{
get
trainingServicePlatform
():
string
{
if
(
Array
.
isArray
(
this
.
config
.
trainingService
))
{
return
'
hybrid
'
;
}
else
if
(
this
.
config
.
trainingService
)
{
return
this
.
config
.
trainingService
.
platform
;
return
this
.
config
.
trainingService
.
platform
;
}
else
{
return
(
this
.
config
as
any
).
trainingServicePlatform
;
}
}
}
get
searchSpace
():
object
{
get
searchSpace
():
object
{
...
...
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