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

   ### What changes were proposed in this PR?
   
   The task dropdown offered six tasks the operator has no codegen for: 
`text-classification`, `token-classification`, `translation`, `summarization`, 
`feature-extraction`, and `fill-mask`. Selecting one silently fell back to 
text-generation and wrote raw JSON into the result column. The dynamic 
`/api/tasks` fetch could surface further unsupported tags on top of that. 
Meanwhile four tasks that *are* supported (`image-to-image`, 
`image-text-to-text`, `text-to-image`, `text-to-video`) were missing from the 
list.
   
   `STATIC_TASK_OPTIONS` is now exactly the 20 tasks with a registered codegen, 
grouped by the codegen that handles them, and a `SUPPORTED_TASK_TAGS` set 
derived from it filters the dynamic `/api/tasks` result. If that filter leaves 
nothing, say HF renames its tags, the static list is used rather than an empty 
dropdown. A comment ties the list to 
`HuggingFaceInferenceOpDesc.registeredCodegens` so the two stay in sync.
   
   ### Any related issues?
   
   Closes #7047
   
   ### How was this PR tested?
   
   95 tests pass in `hugging-face.component.spec.ts`, and Prettier is clean. 
Five tests were added: the unsupported tasks are absent from the list, the four 
newly added supported tasks are present, `SUPPORTED_TASK_TAGS` mirrors the 
static tags, an API response mixing supported and unsupported tasks is filtered 
down to the supported ones, and an all-unsupported response falls back to the 
static list.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Yes, this PR was co-authored with Claude in compliance with ASF policy.


-- 
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