Merge pull request #24271 from daniel-s-ingram:master
PiperOrigin-RevId: 226090953
This commit is contained in:
commit
b2e8e62466
@ -68,7 +68,7 @@ class Aggregator(object):
|
||||
Arguments:
|
||||
batch_outs: A list of batch-level outputs.
|
||||
"""
|
||||
NotImplementedError('Must be implemented in subclasses.')
|
||||
raise NotImplementedError('Must be implemented in subclasses.')
|
||||
|
||||
@abc.abstractmethod
|
||||
def aggregate(self, batch_outs, batch_start=None, batch_end=None):
|
||||
@ -81,12 +81,12 @@ class Aggregator(object):
|
||||
batch_end: The end index of this batch. Always `None` if `use_steps` is
|
||||
`True`.
|
||||
"""
|
||||
NotImplementedError('Must be implemented in subclasses.')
|
||||
raise NotImplementedError('Must be implemented in subclasses.')
|
||||
|
||||
@abc.abstractmethod
|
||||
def finalize(self):
|
||||
"""Prepares the total results to be returned."""
|
||||
NotImplementedError('Must be implemented in subclasses.')
|
||||
raise NotImplementedError('Must be implemented in subclasses.')
|
||||
|
||||
|
||||
class MetricsAggregator(Aggregator):
|
||||
@ -1244,4 +1244,3 @@ def trace_model_call(model, input_signature=None):
|
||||
return {name: output for name, output in zip(output_names, outputs_list)}
|
||||
|
||||
return _wrapped_model
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user