From a98263b9a91601818e7e17c10907ed2b7ccb8bec Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 9 May 2023 16:34:14 +0100 Subject: [PATCH] Let's YOLO a serving output too --- src/transformers/modeling_tf_utils.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/transformers/modeling_tf_utils.py b/src/transformers/modeling_tf_utils.py index b39e99cdadbc18..70798aa0977188 100644 --- a/src/transformers/modeling_tf_utils.py +++ b/src/transformers/modeling_tf_utils.py @@ -1252,13 +1252,10 @@ def get_serving_input_signature(self) -> List[Dict[str, tf.TensorSpec]]: def serving_output(self, output): """ - Prepare the output of the saved model. Each model must implement this function. - - Args: - output ([`TFBaseModelOutput`]): - The output returned by the model. + Prepare the output of the saved model. Can be overridden if specific serving modifications are required. """ - raise NotImplementedError + + return output def can_generate(self) -> bool: """