PG1204 opened a new pull request, #7242:
URL: https://github.com/apache/texera/pull/7242

   ### What changes were proposed in this PR?
   
   In the HuggingFace operator's `_post_with_fallback`, a 401 from any single 
provider immediately aborted the whole fallback chain (reported as "Invalid HF 
API token"), even when another provider would have served the model with the 
same token, one provider can 401 (e.g. missing provider-specific permission) 
while others accept the token.
   
   This removes the 401 short-circuit and adds 401 to the `RETRYABLE` set, so 
the loop tries the remaining providers. "Invalid HF API token" is now surfaced 
only when the final provider still returns 401 (i.e. every provider rejected 
the token).
   
   ### Any related issues, documentation, discussions?
   
   Closes #7194.
   
   ### How was this PR tested?
   
   `sbt "WorkflowOperator/testOnly 
org.apache.texera.amber.operator.huggingFace.* 
org.apache.texera.amber.util.PythonCodeRawInvalidTextSpec"`: passes (125 
tests). Added a test asserting 401 is retryable and the old short-circuit is 
gone; `PythonCodeRawInvalidTextSpec` py-compiles the generated Python. scalafmt 
clean.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   No, this PR was not authored or co-authored using generative AI tooling.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to