Skip to content

fix: inject processor into data handler fn_kwargs#664

Merged
dushyantbehl merged 1 commit intofoundation-model-stack:mainfrom
YashasviChaurasia:fix/multimodal-processor-injection
Mar 3, 2026
Merged

fix: inject processor into data handler fn_kwargs#664
dushyantbehl merged 1 commit intofoundation-model-stack:mainfrom
YashasviChaurasia:fix/multimodal-processor-injection

Conversation

@YashasviChaurasia
Copy link
Copy Markdown
Contributor

@YashasviChaurasia YashasviChaurasia commented Mar 3, 2026

Description of the change

DataPreProcessor.__execute_map_data_handler injected self.tokenizer into handler fn_kwargs but not self.processor. This caused
prepare_multimodal_data_processor to fail with ValueError: Processor is missing during vision model (e.g., LlavaNext/Granite Vision) fine-tuning, even
though the processor was correctly loaded and stored on the DataPreProcessor instance.

Related issue number

N/A — related slack thread: https://ibm-research.slack.com/archives/C0698T0FW3S/p1771832445118339

How to verify the PR

python -m pytest tests/data/test_data_preprocessing.py::test_multimodal_processor_injection_in_data_pipeline
tests/data/test_data_preprocessing.py::test_multimodal_processor_missing_raises_error -v

Was the PR tested

  • I have added >=1 unit test(s) for every new method I have added.
  • I have ensured all unit tests pass

Signed-off-by: yashasvi <yashasvi@ibm.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 3, 2026

Thanks for making a pull request! 😃
One of the maintainers will review and advise on the next steps.

@github-actions github-actions Bot added the fix label Mar 3, 2026
Copy link
Copy Markdown
Collaborator

@dushyantbehl dushyantbehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dushyantbehl dushyantbehl merged commit 8f211e6 into foundation-model-stack:main Mar 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants