From ee01265a234a5d10b5fe3a90bb961d8046c80202 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 27 Sep 2021 23:08:53 +0000 Subject: [PATCH 1/3] updated to support Trasnformers==4.11.0 --- .../Huggingface_Transformers/Transformer_handler_generalized.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/Huggingface_Transformers/Transformer_handler_generalized.py b/examples/Huggingface_Transformers/Transformer_handler_generalized.py index c09a205782..a12ed599bd 100644 --- a/examples/Huggingface_Transformers/Transformer_handler_generalized.py +++ b/examples/Huggingface_Transformers/Transformer_handler_generalized.py @@ -183,7 +183,7 @@ def inference(self, input_batch): # the output should be only answer_start and answer_end # we are outputing the words just for demonstration. if self.setup_config["save_mode"]=="pretrained": - outputs = self.model(input_batch) + outputs = self.model(input_ids_batch,attention_mask_batch) answer_start_scores = outputs.start_logits answer_end_scores = outputs.end_logits else: From bfe724f8bd6030d9cb2bcba10955803d0b6008f1 Mon Sep 17 00:00:00 2001 From: Hamid Shojanazeri Date: Mon, 27 Sep 2021 23:11:11 +0000 Subject: [PATCH 2/3] upate the Trasnformers version --- requirements/developer.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/developer.txt b/requirements/developer.txt index 627f5ee9e0..f276c98421 100644 --- a/requirements/developer.txt +++ b/requirements/developer.txt @@ -9,5 +9,5 @@ nvgpu==0.8.0; sys_platform == 'win32' grpcio protobuf grpcio-tools -transformers==4.6.0 +transformers==4.11.0 pygit2 From 92ee4141991be165fffa423d1c202fcc3fbb301e Mon Sep 17 00:00:00 2001 From: Andreas Bergmeier <51448674+AndreasBergmeier6176@users.noreply.github.com> Date: Mon, 1 Nov 2021 11:42:12 +0100 Subject: [PATCH 3/3] Fix error message Logging null does not make sense. --- .../server/src/main/java/org/pytorch/serve/util/ApiUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/server/src/main/java/org/pytorch/serve/util/ApiUtils.java b/frontend/server/src/main/java/org/pytorch/serve/util/ApiUtils.java index a6ad90edfd..ecc4be9382 100644 --- a/frontend/server/src/main/java/org/pytorch/serve/util/ApiUtils.java +++ b/frontend/server/src/main/java/org/pytorch/serve/util/ApiUtils.java @@ -402,7 +402,7 @@ public static RestJob addRESTInferenceJob( public static String getInferenceErrorResponseMessage(String modelName, String modelVersion) { String responseMessage = "Model \"" + modelName; - if (modelVersion == null) { + if (modelVersion != null) { responseMessage += "\" Version " + modelVersion; }