From 12bbb1766df75c5a3b4ba0b1a292c518822f2266 Mon Sep 17 00:00:00 2001 From: aibrahiim Date: Fri, 30 Oct 2026 00:58:57 +0200 Subject: [PATCH] drop legacy options from HF Inference api --- .github/trigger_files/beam_PostCommit_Python_Dependency.json | 2 +- .../apache_beam/ml/transforms/embeddings/huggingface.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/trigger_files/beam_PostCommit_Python_Dependency.json b/.github/trigger_files/beam_PostCommit_Python_Dependency.json index 8f085d878840..5d2191840eec 100644 --- a/.github/trigger_files/beam_PostCommit_Python_Dependency.json +++ b/.github/trigger_files/beam_PostCommit_Python_Dependency.json @@ -1,4 +1,4 @@ { "comment": "Modify this file in a trivial way to cause this test suite to run", - "modification": 11 + "modification": 12 } diff --git a/sdks/python/apache_beam/ml/transforms/embeddings/huggingface.py b/sdks/python/apache_beam/ml/transforms/embeddings/huggingface.py index c3eeccf2a0f0..56a9535b5764 100644 --- a/sdks/python/apache_beam/ml/transforms/embeddings/huggingface.py +++ b/sdks/python/apache_beam/ml/transforms/embeddings/huggingface.py @@ -210,12 +210,11 @@ def load_model(self): def run_inference( self, batch, session: requests.Session, inference_args=None): + # HF router feature-extraction accepts inputs only (not nested options). response = session.post( self._config.api_url, headers=self._config.authorization_token, - json={ - "inputs": batch, "options": inference_args - }) + json={"inputs": batch}) return response.json()