Unverified Commit 8a61fe02 authored by Matt's avatar Matt Committed by GitHub
Browse files

Reduce console spam when using the KerasMetricCallback (#18202)

* Reduce console spam when using the KerasMetricCallback

* Switch to predict_on_batch to improve performance
parent ec6cd763
......@@ -202,7 +202,7 @@ class KerasMetricCallback(Callback):
predictions = self.model.generate(generation_inputs, attention_mask=attention_mask)
else:
predictions = self.model.predict(batch)
predictions = self.model.predict_on_batch(batch)
if isinstance(predictions, dict):
# This converts any dict-subclass to a regular dict
# Keras REALLY doesn't like it when we pass around a BatchEncoding or other derived class
......
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