Skip to content

fix: use keyword args for Qwen VL processor call#58

Merged
abrichr merged 2 commits intomainfrom
fix/processor-call-signature
Mar 21, 2026
Merged

fix: use keyword args for Qwen VL processor call#58
abrichr merged 2 commits intomainfrom
fix/processor-call-signature

Conversation

@abrichr
Copy link
Copy Markdown
Member

@abrichr abrichr commented Mar 21, 2026

Fixes TypeError when calling processor with positional text arg that conflicts with images kwarg.

abrichr and others added 2 commits March 21, 2026 15:10
…for transformers 5.x

AutoModelForVision2Seq was removed in transformers 5.x (shipped on AWS DL AMI).
Use AutoModelForImageTextToText as the primary import with a fallback to
AutoModelForVision2Seq for older transformers versions.

Files updated:
- openadapt_ml/training/grpo/trainer.py
- openadapt_ml/cloud/modal_cloud.py
- docs/grpo_trl_rewrite_draft.py (comment only)

Note: openadapt_ml/training/trl_trainer.py already had the correct
try/except pattern and was not modified.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Qwen2_5_VLProcessor.__call__() expects text= and images= as keyword
args. Passing text as positional arg conflicts with images kwarg:
TypeError: got multiple values for argument 'images'

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@abrichr abrichr merged commit d196dce into main Mar 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant