You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "ELin2025 (via GitHub)" <gi...@apache.org> on 2026/06/02 21:48:20 UTC

[I] Add task-aware field visibility and preview to HuggingFace property editor [texera]

ELin2025 opened a new issue, #5316:
URL: https://github.com/apache/texera/issues/5316

   ### Task Summary
   
   ### Task Summary
   
   ## Feature Summary
   
   The HuggingFace inference operator (#5041) is being landed as a sequence of focused PRs. The previous PR (#5314) registered custom formly field type components for the task selector, model browser, and audio upload — but they are not yet wired into the property editor. This issue activates those components and adds task-aware field visibility.
   
   Concretely, landing this would enable:
   
   - Remapping `modelId` to the `huggingface` formly type, rendering the task dropdown and model browser in the property editor
   - Remapping `imageInput` to `huggingface-image-upload` and `audioInput` to `huggingface-audio-upload`
   - Hiding the raw `task` schema field (selection is handled by the HuggingFace component)
   - Showing/hiding `promptColumn`, `imageInput`, `audioInput`, `systemPrompt`, `maxNewTokens`, `temperature`, `contextColumn`, `candidateLabels`, `sentencesColumn` based on the selected task
   - Custom validators for conditionally-required fields (e.g., image upload required for image tasks unless an input column is selected)
   - A task preview card showing media type, input/output flow, and description per task
   
   ## Proposed Solution or Design
   
   Modify:
   
   | File | Change |
   | --- | --- |
   | `operator-property-edit-frame.component.ts` | Remap `modelId`, `imageInput`, `audioInput` to custom formly types; hide `task` field; add formly expression functions for field visibility based on task; add task preview metadata map and getter; add custom validators for conditionally-required fields |
   | `operator-property-edit-frame.component.html` | Add task preview card with `ngSwitch` for video/image/audio/text media types |
   | `operator-property-edit-frame.component.scss` | Styles for the task preview card layout |
   | `operator-property-edit-frame.component.spec.ts` | Tests for task preview resolution (text, image, audio, video, unknown, empty task) |
   | `mock-operator-metadata.data.ts` | Add `mockHuggingFaceSchema` with all HF fields for test harness |
   | `mock-workflow-data.ts` | Add `mockHuggingFacePredicate` operator predicate for tests |
   
   Design constraints:
   
   - Field visibility uses formly `expressions.hide` functions that read the current task from the form control or model — not static configuration.
   - Custom validators (e.g., `requiredImageInput`, `requiredPromptColumn`) must return `true` (valid) when the field is not applicable to the current task.
   - The `task` field is hidden with `hide: true` since the HuggingFace component manages task selection — the raw text input must not be visible.
   - Task preview metadata is a static map keyed by task string — unknown tasks get a generic fallback card.
   
   References:
   
   - Parent issue: #5041
   - Stacked on: #5314 — this PR branches off the task selector and audio upload PR; it wires those registered components into the property editor so they become visible to the user.
   
   ## Impact / Priority
   
   (P2) Medium — this is the PR that makes the HuggingFace operator's custom UI visible in the property editor. Does not affect existing operators.
   
   ## Affected Area
   
   Frontend (Angular) — workspace property editor component.
   
   ### Task Type
   
   - [ ] Refactor / Cleanup
   - [ ] DevOps / Deployment / CI
   - [ ] Testing / QA
   - [ ] Documentation
   - [ ] Performance
   - [x] Other
   
   ### Task Type
   
   - [ ] Refactor / Cleanup
   - [ ] DevOps / Deployment / CI
   - [ ] Testing / QA
   - [ ] Documentation
   - [ ] Performance
   - [x] Other


-- 
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: notifications-unsubscribe@texera.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add task-aware field visibility and preview to HuggingFace property editor [texera]

Posted by "xuang7 (via GitHub)" <gi...@apache.org>.
xuang7 closed issue #5316: Add task-aware field visibility and preview to HuggingFace property editor
URL: https://github.com/apache/texera/issues/5316


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add task-aware field visibility and preview to HuggingFace property editor [texera]

Posted by "ELin2025 (via GitHub)" <gi...@apache.org>.
ELin2025 commented on issue #5316:
URL: https://github.com/apache/texera/issues/5316#issuecomment-4607291572

   /parent-issue #5041 


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add task-aware field visibility and preview to HuggingFace property editor [texera]

Posted by "ELin2025 (via GitHub)" <gi...@apache.org>.
ELin2025 commented on issue #5316:
URL: https://github.com/apache/texera/issues/5316#issuecomment-4607290574

   /take


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org