Commit 87208da1 authored by Chen Chen's avatar Chen Chen Committed by A. Unique TensorFlower
Browse files

Internal change

PiperOrigin-RevId: 308880055
parent ae35d8c7
...@@ -67,8 +67,9 @@ class BertBenchmarkBase(PerfZeroBenchmark): ...@@ -67,8 +67,9 @@ class BertBenchmarkBase(PerfZeroBenchmark):
"""Base class to hold methods common to test classes.""" """Base class to hold methods common to test classes."""
local_flags = None local_flags = None
def __init__(self, output_dir=None, tpu=None): def __init__(self, output_dir=None, tpu=None, **kwargs):
super(BertBenchmarkBase, self).__init__(output_dir=output_dir, tpu=tpu) super(BertBenchmarkBase, self).__init__(
output_dir=output_dir, tpu=tpu, **kwargs)
self.num_gpus = 8 self.num_gpus = 8
self.timer_callback = None self.timer_callback = None
......
...@@ -51,15 +51,17 @@ class BertPretrainAccuracyBenchmark(bert_benchmark_utils.BertBenchmarkBase): ...@@ -51,15 +51,17 @@ class BertPretrainAccuracyBenchmark(bert_benchmark_utils.BertBenchmarkBase):
def __init__(self, def __init__(self,
output_dir: Optional[str] = None, output_dir: Optional[str] = None,
tpu: Optional[str] = None): tpu: Optional[str] = None,
**kwargs):
"""Inits BertPretrainAccuracyBenchmark class. """Inits BertPretrainAccuracyBenchmark class.
Args: Args:
output_dir: Directory where to output e.g. log files output_dir: Directory where to output e.g. log files
tpu: TPU name to use in a TPU benchmark. tpu: TPU name to use in a TPU benchmark.
**kwargs: Additional keyword arguments.
""" """
super(BertPretrainAccuracyBenchmark, self).__init__( super(BertPretrainAccuracyBenchmark, self).__init__(
output_dir=output_dir, tpu=tpu) output_dir=output_dir, tpu=tpu, **kwargs)
@benchmark_wrappers.enable_runtime_flags @benchmark_wrappers.enable_runtime_flags
def _run_and_report_benchmark(self, summary_path: str): def _run_and_report_benchmark(self, summary_path: str):
......
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