diff --git a/perfkitbenchmarker/linux_benchmarks/mlperf_benchmark.py b/perfkitbenchmarker/linux_benchmarks/mlperf_benchmark.py index 92e69823ed..c2db362895 100644 --- a/perfkitbenchmarker/linux_benchmarks/mlperf_benchmark.py +++ b/perfkitbenchmarker/linux_benchmarks/mlperf_benchmark.py @@ -318,6 +318,7 @@ def _CreateMetadataDict(benchmark_spec): 'use_tpu': bool(benchmark_spec.tpus), 'model_dir': benchmark_spec.model_dir, 'model': benchmark_spec.benchmark, + 'version': 'v0.6.0', } if benchmark_spec.tpus: metadata.update({ @@ -349,7 +350,6 @@ def MakeSamplesFromOutput(metadata, output, use_tpu=False, model='resnet'): r':::MLL (\d+\.\d+) eval_accuracy: {(.*)}', output) start = None - version = 'v0.6.0' for wall_time, result in results: wall_time = float(wall_time) if not start: @@ -366,7 +366,6 @@ def MakeSamplesFromOutput(metadata, output, use_tpu=False, model='resnet'): value = regex_util.ExtractExactlyOneMatch(r'"value": (\d+\.\d+)', result) metadata_copy['times'] = wall_time - start metadata_copy['epoch'] = int(epoch) - metadata_copy['version'] = version samples.append( sample.Sample('Eval Accuracy', float(value) * 100, '%', metadata_copy)) diff --git a/tests/linux_benchmarks/mlperf_benchmark_test.py b/tests/linux_benchmarks/mlperf_benchmark_test.py index 687ee24d8c..cdf248072f 100644 --- a/tests/linux_benchmarks/mlperf_benchmark_test.py +++ b/tests/linux_benchmarks/mlperf_benchmark_test.py @@ -32,7 +32,7 @@ def setUp(self): @mock.patch('time.time', mock.MagicMock(return_value=1550279509.59)) def testTrainResults(self): - samples = mlperf_benchmark.MakeSamplesFromOutput({}, + samples = mlperf_benchmark.MakeSamplesFromOutput({'version': 'v0.6.0'}, self.contents, use_tpu=True, model='resnet')