-
Notifications
You must be signed in to change notification settings - Fork 31.1k
fix failure of tests/models/shieldgemma2/test_modeling_shieldgemma2.p… #42022
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…y::ShieldGemma2IntegrationTest::test_model Signed-off-by: Wang, Yi <[email protected]>
|
export RUN_SLOW=true |
|
the reason of the crash is caused by the output of _merge_kwargs. output wo the PR. the "return_tensors":"pt" is missing in value of 'text_kwargs' and ''images_kwargs'. output w the PR output_kwargs = {'text_kwargs': {'padding': True, 'return_mm_token_type_ids': True, 'padding_side': 'left', 'return_tensors': 'pt'}, 'images_kwargs': {'do_convert_rgb': True, 'do_pan_and_scan': False, 'pan_and_scan_min_crop_size': 256, 'pan_and_scan_max_num_crops': 4, 'pan_and_scan_min_ratio_to_activate': 1.2, 'return_tensors': 'pt'}, 'audio_kwargs': {'return_tensors': 'pt'}, 'videos_kwargs': {'return_tensors': 'pt'}} |
|
Thank you @sywangyi . Confirmed the issue and the PR makes the test passing. I will take a close look on the changes 🙏 |
|
@zucchini-nlp This issue is introduced in 🚨 [unbloating] unify With Its parent commit 42bcc81, the test passed. Could you take a look and see if the changes in this PR by @sywangyi is the best/correct way to handle it? Thank you. |
sorry, which PR you mean? all these PR seems to have been merged in Oct. |
I don't think this is a valid input to the processor since some of the kwargs are structured like text/images and the rest are not. The common kwargs can be structured as |
|
@zucchini-nlp So do you have a suggestion to change the code block below to make it work? |
|
Yep, we can instead fix it in ShieldGemma's processor class by passing |
|
thanks, update the PR |
|
[For maintainers] Suggested jobs to run (before merge) run-slow: shieldgemma2 |
zucchini-nlp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks, can be merged after Yih-Dar confirms that CI is ✔️
…y::ShieldGemma2IntegrationTest::test_model
@ydshieh