Commit d196dce
fix: use keyword args for Qwen VL processor call (#58)
* fix: replace AutoModelForVision2Seq with AutoModelForImageTextToText 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>
* fix: use keyword args for Qwen VL processor to avoid positional conflict
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>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent ec45b27 commit d196dce
File tree
3 files changed
+16
-8
lines changed- docs
- openadapt_ml
- cloud
- training/grpo
3 files changed
+16
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
952 | 952 | | |
953 | 953 | | |
954 | 954 | | |
955 | | - | |
| 955 | + | |
956 | 956 | | |
957 | 957 | | |
958 | 958 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
340 | 343 | | |
341 | | - | |
| 344 | + | |
342 | 345 | | |
343 | 346 | | |
344 | 347 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
226 | 231 | | |
227 | 232 | | |
228 | 233 | | |
| |||
239 | 244 | | |
240 | 245 | | |
241 | 246 | | |
242 | | - | |
| 247 | + | |
243 | 248 | | |
244 | 249 | | |
245 | 250 | | |
| |||
322 | 327 | | |
323 | 328 | | |
324 | 329 | | |
325 | | - | |
| 330 | + | |
326 | 331 | | |
327 | 332 | | |
328 | 333 | | |
| |||
519 | 524 | | |
520 | 525 | | |
521 | 526 | | |
522 | | - | |
| 527 | + | |
523 | 528 | | |
524 | 529 | | |
525 | 530 | | |
| |||
0 commit comments