Skip to content

fix(gui): only offer Hugging Face tasks the operator can run - #7904

Open
PG1204 wants to merge 1 commit into
apache:mainfrom
PG1204:fix/hf-prune-unsupported-tasks
Open

fix(gui): only offer Hugging Face tasks the operator can run#7904
PG1204 wants to merge 1 commit into
apache:mainfrom
PG1204:fix/hf-prune-unsupported-tasks

Conversation

@PG1204

@PG1204 PG1204 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions Bot added fix frontend Changes related to the frontend GUI labels Aug 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @mengw15, @juliethecao
    You can notify them by mentioning @mengw15, @juliethecao in a comment.

@github-actions

Copy link
Copy Markdown
Contributor

Backport auto-label report

This fix: PR was checked against each actively-supported release branch. release/* labels drive the post-merge backport, so add or remove one to change where this fix lands.

Release branch Analysis
⚠️ release/v1.2 Not labeled automatically — none of the files this PR modifies exist on this branch (frontend/src/app/workspace/component/hugging-face/hugging-face.component.spec.ts, frontend/src/app/workspace/component/hugging-face/hugging-face.component.ts). The fix may target code that isn't on this release, or the files were moved/renamed after the branch was cut. Please check and add release/v1.2 by hand if this fix should be backported here.

Auto-label run.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.36%. Comparing base (4786d6c) to head (06cc32c).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #7904   +/-   ##
=========================================
  Coverage     92.36%   92.36%           
  Complexity     4583     4583           
=========================================
  Files          1173     1173           
  Lines         47347    47349    +2     
  Branches       5306     5306           
=========================================
+ Hits          43733    43735    +2     
  Misses         2018     2018           
  Partials       1596     1596           
Flag Coverage Δ *Carryforward flag
access-control-service 81.00% <ø> (ø) Carriedforward from 4786d6c
agent-service 98.62% <ø> (ø) Carriedforward from 4786d6c
amber 88.94% <ø> (ø) Carriedforward from 4786d6c
computing-unit-managing-service 73.67% <ø> (ø) Carriedforward from 4786d6c
config-service 86.73% <ø> (ø) Carriedforward from 4786d6c
file-service 82.59% <ø> (ø) Carriedforward from 4786d6c
frontend 94.22% <100.00%> (+<0.01%) ⬆️
notebook-migration-service 79.13% <ø> (ø) Carriedforward from 4786d6c
pyamber 97.57% <ø> (ø) Carriedforward from 4786d6c
workflow-compiling-service 77.19% <ø> (ø) Carriedforward from 4786d6c

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@PG1204

PG1204 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

/request-review @xuang7

@github-actions
github-actions Bot requested a review from xuang7 August 24, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HuggingFace inference operator: task dropdown offers tasks with no codegen, which silently fall back to text-gen and emit raw JSON

2 participants