Unverified Commit bae7e025 authored by chicm-ms's avatar chicm-ms Committed by GitHub
Browse files

fix datastore for multiple final result (#129)

parent d3506e34
...@@ -160,12 +160,11 @@ class NNIDataStore implements DataStore { ...@@ -160,12 +160,11 @@ class NNIDataStore implements DataStore {
private async getFinalMetricData(trialJobId: string): Promise<any> { private async getFinalMetricData(trialJobId: string): Promise<any> {
const metrics: MetricDataRecord[] = await this.getMetricData(trialJobId, 'FINAL'); const metrics: MetricDataRecord[] = await this.getMetricData(trialJobId, 'FINAL');
assert(metrics.length <= 1); if (metrics.length > 1) {
if (metrics.length === 1) { this.log.error(`Found multiple final results for trial job: ${trialJobId}`);
return metrics[0];
} else {
return undefined;
} }
return metrics[0];
} }
private getJobStatusByLatestEvent(event: TrialJobEvent): TrialJobStatus { private getJobStatusByLatestEvent(event: TrialJobEvent): TrialJobStatus {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment