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
e661c552
Commit
e661c552
authored
Jan 03, 2019
by
Shinai Yang (FA TALENT)
Browse files
fix forEach
parent
91612098
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/nni_manager/training_service/kubernetes/kubernetesTrainingService.ts
.../training_service/kubernetes/kubernetesTrainingService.ts
+3
-3
src/nni_manager/training_service/pai/paiTrainingService.ts
src/nni_manager/training_service/pai/paiTrainingService.ts
+2
-2
No files found.
src/nni_manager/training_service/kubernetes/kubernetesTrainingService.ts
View file @
e661c552
...
@@ -81,14 +81,14 @@ abstract class KubernetesTrainingService {
...
@@ -81,14 +81,14 @@ abstract class KubernetesTrainingService {
}
}
}
}
public
listTrialJobs
():
Promise
<
TrialJobDetail
[]
>
{
public
async
listTrialJobs
():
Promise
<
TrialJobDetail
[]
>
{
const
jobs
:
TrialJobDetail
[]
=
[];
const
jobs
:
TrialJobDetail
[]
=
[];
this
.
trialJobsMap
.
forEach
(
async
(
value
:
KubernetesTrialJobDetail
,
key
:
string
)
=>
{
for
(
const
[
key
,
value
]
of
this
.
trialJobsMap
)
{
if
(
value
.
form
.
jobType
===
'
TRIAL
'
)
{
if
(
value
.
form
.
jobType
===
'
TRIAL
'
)
{
jobs
.
push
(
await
this
.
getTrialJob
(
key
));
jobs
.
push
(
await
this
.
getTrialJob
(
key
));
}
}
}
)
;
};
return
Promise
.
resolve
(
jobs
);
return
Promise
.
resolve
(
jobs
);
}
}
...
...
src/nni_manager/training_service/pai/paiTrainingService.ts
View file @
e661c552
...
@@ -104,11 +104,11 @@ class PAITrainingService implements TrainingService {
...
@@ -104,11 +104,11 @@ class PAITrainingService implements TrainingService {
public
async
listTrialJobs
():
Promise
<
TrialJobDetail
[]
>
{
public
async
listTrialJobs
():
Promise
<
TrialJobDetail
[]
>
{
const
jobs
:
TrialJobDetail
[]
=
[];
const
jobs
:
TrialJobDetail
[]
=
[];
this
.
trialJobsMap
.
forEach
(
async
(
value
:
PAITrialJobDetail
,
key
:
string
)
=>
{
for
(
const
[
key
,
value
]
of
this
.
trialJobsMap
)
{
if
(
value
.
form
.
jobType
===
'
TRIAL
'
)
{
if
(
value
.
form
.
jobType
===
'
TRIAL
'
)
{
jobs
.
push
(
await
this
.
getTrialJob
(
key
));
jobs
.
push
(
await
this
.
getTrialJob
(
key
));
}
}
}
)
;
};
return
Promise
.
resolve
(
jobs
);
return
Promise
.
resolve
(
jobs
);
}
}
...
...
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