You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@texera.apache.org by gi...@apache.org on 2026/07/30 20:33:54 UTC
(texera) branch main updated (ffbda03134 -> 421e66027d)
This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git
from ffbda03134 refactor(auth): construct User via .tap instead of positional constructor (#7057)
new d0c6441ac9 fix(workflow-operator): send provider-specific model id on HF text-gen chat fallback routes (#6972)
new 421e66027d fix(license): refresh amber/LICENSE-binary-python for transitive drift on main (#7139)
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
amber/LICENSE-binary-python | 38 +++++++++++-----------
.../huggingFace/codegen/PythonCodegenBase.scala | 15 +++++++--
.../HuggingFaceInferenceOpDescSpec.scala | 17 ++++++++++
3 files changed, 48 insertions(+), 22 deletions(-)
(texera) 02/02: fix(license): refresh amber/LICENSE-binary-python for transitive drift on main (#7139)
Posted by gi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git
commit 421e66027d8fc6a5a8011949c3247a1e4dd394e7
Author: Xuan Gu <16...@users.noreply.github.com>
AuthorDate: Thu Jul 30 13:31:58 2026 -0700
fix(license): refresh amber/LICENSE-binary-python for transitive drift on main (#7139)
### What changes were proposed in this PR?
Refresh 19 transitive Python dependency versions in
`amber/LICENSE-binary-python` to match the versions actually bundled,
resolving the License Binary Checker failure on `main`
(`build / pyamber (ubuntu-latest, 3.12)`). Versions only; license
categories unchanged.
### Any related issues, documentation, discussions?
Closes #6605
Run: https://github.com/apache/texera/actions/runs/30576872953
### How was this PR tested?
Text-only version bumps in the LICENSE-binary manifest; the pyamber
license
check passes once the claimed versions match the bundled ones.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.8)
Co-authored-by: Claude Opus 4.8 <no...@anthropic.com>
---
amber/LICENSE-binary-python | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/amber/LICENSE-binary-python b/amber/LICENSE-binary-python
index 03dfd037f7..9faae2f76b 100644
--- a/amber/LICENSE-binary-python
+++ b/amber/LICENSE-binary-python
@@ -212,13 +212,13 @@ Dependencies under the Apache License, Version 2.0
Python packages:
- aiobotocore==3.7.0
- - aiohttp==3.14.1
+ - aiohttp==3.14.3
- aiosignal==1.4.0
- boto3==1.42.90
- botocore==1.42.90
- frozenlist==1.8.0
- - hf-xet==1.5.1
- - huggingface-hub==1.23.0
+ - hf-xet==1.5.2
+ - huggingface-hub==1.26.0
- multidict==6.7.1
- overrides==7.7.0
- packaging==26.2
@@ -227,7 +227,7 @@ Python packages:
- pyiceberg==0.11.1
- pympler==1.1
- python-dateutil==2.9.0.post0
- - regex==2026.7.10
+ - regex==2026.7.19
- requests==2.34.2
- s3transfer==0.16.1
- safetensors==0.8.0
@@ -236,7 +236,7 @@ Python packages:
- transformers==5.5.0
- tzdata==2026.3
- websocket-client==1.9.0
- - yarl==1.24.2
+ - yarl==1.24.5
--------------------------------------------------------------------------------
Dependencies under the MIT License
@@ -244,8 +244,8 @@ Dependencies under the MIT License
Python packages:
- aioitertools==0.13.0
- - annotated-doc==0.0.4
- - annotated-types==0.7.0
+ - annotated-doc==0.0.5
+ - annotated-types==0.8.0
- anyio==4.14.2
- appdirs==1.4.4
- asn1crypto==1.5.1
@@ -253,12 +253,12 @@ Python packages:
- betterproto==2.0.0b7
- cachetools==6.2.6
- charset-normalizer==3.4.9
- - filelock==3.29.7
+ - filelock==3.32.2
- fonttools==4.63.0
- fs==2.4.16
- - greenlet==3.5.3
+ - greenlet==3.5.4
- h11==0.16.0
- - h2==4.3.0
+ - h2==4.4.0
- hpack==4.2.0
- hyperframe==6.1.0
- jmespath==1.1.0
@@ -272,15 +272,15 @@ Python packages:
- pydantic-core==2.46.4
- pyparsing==3.3.2
- pyroaring==1.1.0
- - pytz==2026.2
+ - pytz==2026.3.post1
- pyyaml==6.0.3
- readerwriterlock==1.0.9
- rich==14.3.4
- - scramp==1.4.12
+ - scramp==1.4.15
- six==1.17.0
- sqlalchemy==2.0.51
- strictyaml==1.7.3
- - typer==0.26.8
+ - typer==0.27.0
- typing-inspection==0.4.2
- tzlocal==2.1
- urllib3==2.7.0
@@ -317,7 +317,7 @@ Python packages:
- scipy==1.18.0
- sympy==1.14.0
- threadpoolctl==3.6.0
- - tifffile==2026.6.1
+ - tifffile==2026.7.14
- torch==2.13.0
- zstandard==0.25.0
@@ -326,12 +326,12 @@ Dependencies under the BSD 2-Clause License
--------------------------------------------------------------------------------
Python packages:
- - imageio==2.37.3
+ - imageio==2.37.4
- praw==7.6.1
- prawcore==2.4.0
- pygments==2.20.0
- update-checker==1.0.0
- - wrapt==2.2.2
+ - wrapt==2.3.0
--------------------------------------------------------------------------------
Dependencies under the ISC License
@@ -346,8 +346,8 @@ Dependencies under the Mozilla Public License, Version 2.0
Python packages:
- bidict==0.22.0
- - certifi==2026.6.17
- - tqdm==4.68.4
+ - certifi==2026.7.22
+ - tqdm==4.70.0
--------------------------------------------------------------------------------
Dependencies under the Python Software Foundation License
@@ -355,7 +355,7 @@ Dependencies under the Python Software Foundation License
Python packages:
- aiohappyeyeballs==2.7.1
- - matplotlib==3.11.0
+ - matplotlib==3.11.1
- typing-extensions==4.14.1
--------------------------------------------------------------------------------
(texera) 01/02: fix(workflow-operator): send provider-specific model id on HF text-gen chat fallback routes (#6972)
Posted by gi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git
commit d0c6441ac950caef3590f1bbae105891411087a6
Author: Prateek Ganigi <91...@users.noreply.github.com>
AuthorDate: Thu Jul 30 13:29:36 2026 -0700
fix(workflow-operator): send provider-specific model id on HF text-gen chat fallback routes (#6972)
### What changes were proposed in this PR?
Fixes two related bugs in the HuggingFace inference operator's
provider-fallback loop (`_post_with_fallback` in the generated Python,
emitted by `PythonCodegenBase.scala`) that break the `text-generation` /
`image-text-to-text` path, which is the operator's default task.
1. **Wrong model id on provider-scoped chat routes.** The chat branch
posted the same payload, carrying `"model": self.MODEL_ID` (the HF Hub
ID), to every provider's route (`router.huggingface.co/{provider}/...`).
Provider-scoped routes require the provider's *own* model name
(`providerId`, e.g. the Hub's `Qwen/Qwen2.5-72B-Instruct` is a different
string on Groq or Fireworks), which `_resolve_providers` already fetches
and `_call_provider` already uses for the other task families. Providers
whose internal name differs from the Hub ID rejected every request with
400/404, so fallback only succeeded when the names happened to match.
The chat branch now posts a per-attempt copy with the model overridden:
chat_payload = {**pipeline_payload, "model": provider_id}
(a copy, not in-place mutation, pipeline_payload is reused for the next
provider
attempt).
2. **Malformed hf-inference chat URL.** The chat URL for hf-inference
was built as `hf-inference/v1/chat/completions`, but hf-inference
expects the model in the URL path:
`hf-inference/models/{model-id}/v1/chat/completions` (the form this file
already uses for pipeline tasks). Since hf-inference sorts first in
`PROVIDER_COST_PRIORITY`, the cheapest provider failed on every row,
wasting a doomed request (up to the 120 s timeout) per row before
falling through.
Net effect: text-gen rows now succeed on the cheapest live provider
instead of failing with "All inference providers failed" or silently
drifting to pricier providers. No behavior change for other task
families - `_call_provider` already handled them correctly.
### Any related issues, documentation, discussions?
Closes #6965
### How was this PR tested?
Added a generated-code test to HuggingFaceInferenceOpDescSpec ("send the
provider-specific model id on provider-scoped chat routes") pinning both
fixes: the corrected hf-inference chat URL, and the chat branch posting
the per-provider payload copy (asserted as an anchored two-line block so
pipeline routes that legitimately post pipeline_payload directly stay
unaffected).
Run:
sbt "WorkflowOperator/testOnly
org.apache.texera.amber.operator.huggingFace.*"
Full HF package passes (123 tests, 12 suites), including
PythonCodeRawInvalidTextSpec, which py_compiles the generated Python of
all 117 Python operators, verifying the edited template still emits
syntactically valid Python. scalafmt clean.
### Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Fable 5 in compliance with ASF.
---------
Co-authored-by: Yicong Huang <17...@users.noreply.github.com>
Co-authored-by: Xuan Gu <16...@users.noreply.github.com>
---
.../huggingFace/codegen/PythonCodegenBase.scala | 15 ++++++++++++---
.../huggingFace/HuggingFaceInferenceOpDescSpec.scala | 17 +++++++++++++++++
2 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/huggingFace/codegen/PythonCodegenBase.scala b/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/huggingFace/codegen/PythonCodegenBase.scala
index bac14f0a8a..36a2a329a0 100644
--- a/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/huggingFace/codegen/PythonCodegenBase.scala
+++ b/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/huggingFace/codegen/PythonCodegenBase.scala
@@ -205,9 +205,18 @@ object PythonCodegenBase {
| prov_task = prov.get("task", "")
| try:
| if self.TASK in ("text-generation", "image-text-to-text"):
- | route = self.CHAT_ROUTES.get(provider_name, "v1/chat/completions")
- | url = f"https://router.huggingface.co/{provider_name}/{route}"
- | resp = requests.post(url, headers=json_headers, json=pipeline_payload, timeout=120)
+ | if provider_name == "hf-inference":
+ | # hf-inference expects the model in the URL path, like the
+ | # pipeline route below.
+ | url = f"https://router.huggingface.co/hf-inference/models/{self.MODEL_ID}/v1/chat/completions"
+ | else:
+ | route = self.CHAT_ROUTES.get(provider_name, "v1/chat/completions")
+ | url = f"https://router.huggingface.co/{provider_name}/{route}"
+ | # Provider-scoped routes need the provider's own model name
+ | # (providerId), not the HF Hub ID. Copy instead of mutating:
+ | # pipeline_payload is reused for the next provider attempt.
+ | chat_payload = {**pipeline_payload, "model": provider_id}
+ | resp = requests.post(url, headers=json_headers, json=chat_payload, timeout=120)
| elif is_model_author and prov_task in ("image-to-text", "image-text-to-text") and provider_name not in ("zai-org",):
| url = f"https://router.huggingface.co/{provider_name}/v1/chat/completions"
| img_b64 = ""
diff --git a/common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/huggingFace/HuggingFaceInferenceOpDescSpec.scala b/common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/huggingFace/HuggingFaceInferenceOpDescSpec.scala
index 3db7576470..7fcfe541bf 100644
--- a/common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/huggingFace/HuggingFaceInferenceOpDescSpec.scala
+++ b/common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/huggingFace/HuggingFaceInferenceOpDescSpec.scala
@@ -113,6 +113,23 @@ class HuggingFaceInferenceOpDescSpec extends AnyFlatSpec with Matchers {
code should include("""body["choices"][0]["message"]["content"]""")
}
+ it should "send the provider-specific model id on provider-scoped chat routes" in {
+ val code = makeDesc().generatePythonCode()
+ // hf-inference's chat-completions endpoint carries the model in the URL path.
+ code should include(
+ "https://router.huggingface.co/hf-inference/models/{self.MODEL_ID}/v1/chat/completions"
+ )
+ // The chat branch posts a per-provider copy of the payload with the
+ // provider's own model name (providerId) — the Hub ID is only valid on
+ // hf-inference itself. Matched as one block so the assertion is anchored
+ // to the chat branch: pipeline routes elsewhere legitimately post the
+ // shared pipeline_payload directly.
+ code should include(
+ "chat_payload = {**pipeline_payload, \"model\": provider_id}\n" +
+ " resp = requests.post(url, headers=json_headers, json=chat_payload, timeout=120)"
+ )
+ }
+
it should
"emit a runtime check that rejects malformed MODEL_ID values before any HF URL is built" in {
val code = makeDesc().generatePythonCode()