333b44e6d8996d25f892d15b7fc07eae9b861c76,tests/linux_benchmarks/resnet_benchmark_test.py,ResNetBenchmarkTestCase,testTrainResults,#ResNetBenchmarkTestCase#,36
Before Change
def testTrainResults(self):
samples = mnist_benchmark.MakeSamplesFromTrainOutput(
self.metadata, self.contents, 0)
golden = [
Sample(
"Loss", 3.6859958, "",
{"epoch": 4.000479577971386, "elapsed seconds": 0,
"num_examples_per_epoch": 1251.1, "step": 5005}),
Sample(
"Global Steps Per Second", 3.6699466666666667, "global_steps/sec",
{"epoch": 4.000479577971386, "elapsed seconds": 0,
"num_examples_per_epoch": 1251.1, "step": 5005}),
Sample(
"Examples Per Second", 3758.023333333333, "examples/sec",
{"epoch": 4.000479577971386, "elapsed seconds": 0,
"num_examples_per_epoch": 1251.1, "step": 5005})
]
self.assertEqual(samples, golden)
@mock.patch("time.time", mock.MagicMock(return_value=0))
def testEvalResults(self):
After Change
def testTrainResults(self):
samples = mnist_benchmark.MakeSamplesFromTrainOutput(
self.metadata_input, self.contents, 0)
golden = [
Sample("Loss", 3.6859958, "", self.metadata_output),
Sample("Global Steps Per Second", 3.6699466666666667,
"global_steps/sec", self.metadata_output),
Sample("Examples Per Second", 3758.023333333333,
"examples/sec", self.metadata_output)
]
self.assertEqual(samples, golden)
@mock.patch("time.time", mock.MagicMock(return_value=0))
def testEvalResults(self):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 14
Instances
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 333b44e6d8996d25f892d15b7fc07eae9b861c76
Time: 2018-09-25
Author: tohaowu@google.com
File Name: tests/linux_benchmarks/resnet_benchmark_test.py
Class Name: ResNetBenchmarkTestCase
Method Name: testTrainResults
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 333b44e6d8996d25f892d15b7fc07eae9b861c76
Time: 2018-09-25
Author: tohaowu@google.com
File Name: tests/linux_benchmarks/resnet_benchmark_test.py
Class Name: ResNetBenchmarkTestCase
Method Name: testEvalResults
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 333b44e6d8996d25f892d15b7fc07eae9b861c76
Time: 2018-09-25
Author: tohaowu@google.com
File Name: tests/linux_benchmarks/resnet_benchmark_test.py
Class Name: ResNetBenchmarkTestCase
Method Name: testTrainResults
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 333b44e6d8996d25f892d15b7fc07eae9b861c76
Time: 2018-09-25
Author: tohaowu@google.com
File Name: tests/linux_benchmarks/mnist_benchmark_test.py
Class Name: MnistBenchmarkTestCase
Method Name: testTrainResults