NVIDIA-NeMo / NVIDIA-NeMo/Curator

Expand inputs/outputs of a ProcessingStage to support more than 1 type of task/input

Open
#2,150 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
1.8k
Forks
328
Avg merge
4d 5h
Merged PRs (30d)
30

Description

Is your feature request related to a problem? Please describe.
Currently many stages typically work with a single type of task as input/output for eg: DocumentBatch or VideoTask.
Even if a stage accepts different task types often they may have the same input/output requirements ["data"]["text"].
However with more cases of stages being applicable cross modality and cross task there might be cases where the input and output spec vary depending on the task type.

For eg: MinHashStage can be extended to operate on DocumentBatch in addition to FilegroupTask. However the input requirements for fgtask is (["data"], []) however for DocumentBatch it would be (["Data"], ["text","id"]). Which breaks validate_inputs in many cases or forces the stages to include the least amount of validation requirements to allow multiple types to work.

Describe the solution you'd like
One solution might be to allow inputs/ouputs to be of type Dict{Class: tuple[list, list]} where each key is the task implementation.

Describe alternatives you've considered
Alternative is for each stage with this requirement to override the validate_input/validate_output stage to handle the custom branching logic.

Additional context
Add any other context or screenshots about the feature request here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading ProcessingStage and its validate_inputs, validate_input, and validate_output behavior, then trace how MinHashStage handles FilegroupTask and DocumentBatch. Clarify the task-specific input/output contract and how validation should select it; done means both task types can use their distinct requirements without weakening validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.