-
Notifications
You must be signed in to change notification settings - Fork 644
FEAT: Added VLSU Multimodal Dataset #1309
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
Conversation
rlundeen2
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.
This is good! Thank you! I think once comments are addressed and CI passes it should be ready to merge.
…p_id and are added/skipped together based on combined_grade. This ensures they can be sent as a single multimodal message.
I've made all the changes you mentioned, please lmk if you think any more changes are needed! |
Description
Added VLSU multimodal dataset. This dataset contains multimodal prompts (text+images) which have safety gradings and categories for the text, images and both combined. This functionality creates text prompts, image prompts and multimodal prompts from the same.
Closes #1285.
Files Changed:
pyrit/datasets/seed_datasets/remote/vlsu_multimodal_dataset.py(new)pyrit/datasets/seed_datasets/remote/__init__.py(updated exports)pyrit/datasets/__init__.py(updated exports)tests/unit/datasets/test_vlsu_multimodal_dataset.py(new)pyrit/models/seed.py(added optionalprompt_textoption in the image prompt)Features:
-- Text-only prompts: When text_grade is unsafe/borderline
-- Image-only prompts: When image_grade is unsafe/borderline
-- Combined prompts: When combined_grade is unsafe/borderline (captures emergent harm)
Tests and Documentation
Some essential unit tests added in
tests/unit/datasets/test_vlsu_multimodal_dataset.py-- Test dataset name property
-- Test initialization with categories
-- Test invalid categories raise ValueError
-- Test text-only prompt creation (unsafe text grade)
-- Test image-only prompt creation (unsafe image grade)
-- Test combined prompt creation (unsafe combined grade)
-- Test all prompts created when all grades unsafe
-- Test borderline grades trigger prompt creation
-- Test no prompts when all grades safe (expects error)
-- Test category filtering
-- Test handling of failed image downloads
pre-commit run --all-filespasses