Skip to content

MAINT: declare LatentInjection ingredients as required data - #3547

Draft
Utkarsh Bahuguna (u7k4rs6) wants to merge 26 commits into
microsoft:mainfrom
u7k4rs6:feat/required-data-latent-injection
Draft

Utkarsh Bahuguna (u7k4rs6) wants to merge 26 commits into
microsoft:mainfrom
u7k4rs6:feat/required-data-latent-injection

Conversation

@u7k4rs6

Copy link
Copy Markdown
Contributor

Third scenario for #3336, stacked on #3546 so only the last commit is new. The five LatentInjection ingredient datasets move to get_required_data, and the reserved boundary marker check becomes a required data validator so refreshed data gets checked too. LatentInjectionDatasetConfiguration keeps the families, max_total and the family/trigger coverage sampling, and its own uncapped and exact-datasets checks are gone. Filters and fetch settings on the config still reach the ingredients, and passing the ingredients as sources still works with a deprecation warning.

Part of #3336

…s to selected techniques

A required-data refresh committed before the scenario assembled its population, so a
refresh that the assembly or the population validators would reject had already replaced
the stored datasets, breaking resume of earlier runs. The refresh now runs the scenario's
full unsampled assembly against the candidates first, so a rejected refresh changes nothing.

Legacy dataset_config validators wrote against the raw template seeds, so they move onto
the required data when an old configuration migrates, instead of receiving the assembled
objectives. ApiKey now requires a prompt template only for the techniques a run selects.
Comment thread pyrit/scenario/core/scenario.py Resolved
Comment thread pyrit/scenario/core/scenario.py Resolved
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…work

A validator can be any callable, including an unhashable instance such as a plain
dataclass, so the migration can't collect them in a set. Remove the moved validators
by object identity instead.
…on test

The configuration no longer accepts its ingredients as dataset sources, so the
population test assembles them through the required-data path instead of the old resolver.

This branch has not been deployed

No deployments
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.

2 participants