Skip to content

Conversation

paulinek13
Copy link
Contributor

This PR adds a new function under pyrit\datasets for fetching multimodal examples from the HarmBench dataset: fetch_harmbench_multimodal_dataset_async.

Resolves #355

Tests and Documentation

✔️ The new function is documented & has relevant unit tests

@paulinek13 paulinek13 marked this pull request as ready for review September 26, 2025 04:32
Copy link
Contributor

@romanlutz romanlutz left a comment

Choose a reason for hiding this comment

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

This looks very good. A few small comments but otherwise ready to merge!

@romanlutz romanlutz self-assigned this Sep 28, 2025
)
prompts.append(image_prompt)
except Exception as e:
logger.warning(f"Failed to fetch image for behavior {behavior_id}: {e}. Skipping this example.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this happen? We have a similar case in @AdrGav941 's PR #1098 which apparently fails to fetch most images because they're simply not available. I would definitely print a warning with the number of prompts failing to fetch at the end (if there are multiple).

Copy link
Contributor

@romanlutz romanlutz left a comment

Choose a reason for hiding this comment

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

Awesome! Just one question really and then we're ready to merge.

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.

FEAT add support for multimodal data from HarmBench
2 participants