-
Notifications
You must be signed in to change notification settings - Fork 31.4k
Open
Labels
Feature requestRequest for a new featureRequest for a new feature
Description
Feature request
I am currently fine-tuning a multimodal model (Qwen2.5-VL) using the official Trainer. The training fails during the dataset length inference step in LengthGroupedSampler because the code strictly checks for dict or BatchEncoding, but multimodal processors often return BatchFeature.
Specifically, the following check raises a ValueError:
| if not isinstance(dataset[0], (dict, BatchEncoding)) or model_input_name not in dataset[0]: |
| if not isinstance(dataset[0], (dict, BatchEncoding)) or model_input_name not in dataset[0]: |
Motivation
As above.
Your contribution
Simply adding BatchFeature in the type check.
Metadata
Metadata
Assignees
Labels
Feature requestRequest for a new featureRequest for a new feature