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
bae7e025
Unverified
Commit
bae7e025
authored
Sep 27, 2018
by
chicm-ms
Committed by
GitHub
Sep 27, 2018
Browse files
fix datastore for multiple final result (#129)
parent
d3506e34
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
src/nni_manager/core/nniDataStore.ts
src/nni_manager/core/nniDataStore.ts
+4
-5
No files found.
src/nni_manager/core/nniDataStore.ts
View file @
bae7e025
...
...
@@ -160,12 +160,11 @@ class NNIDataStore implements DataStore {
private
async
getFinalMetricData
(
trialJobId
:
string
):
Promise
<
any
>
{
const
metrics
:
MetricDataRecord
[]
=
await
this
.
getMetricData
(
trialJobId
,
'
FINAL
'
);
assert
(
metrics
.
length
<=
1
);
if
(
metrics
.
length
===
1
)
{
return
metrics
[
0
];
}
else
{
return
undefined
;
if
(
metrics
.
length
>
1
)
{
this
.
log
.
error
(
`Found multiple final results for trial job:
${
trialJobId
}
`
);
}
return
metrics
[
0
];
}
private
getJobStatusByLatestEvent
(
event
:
TrialJobEvent
):
TrialJobStatus
{
...
...
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