Skip to content

FIX: Propagate dataset_name to jailbreak template seeds#2208

Merged
romanlutz merged 3 commits into
microsoft:mainfrom
romanlutz:romanlutz-validate-jailbreak-dataset-name
Jul 17, 2026
Merged

FIX: Propagate dataset_name to jailbreak template seeds#2208
romanlutz merged 3 commits into
microsoft:mainfrom
romanlutz:romanlutz-validate-jailbreak-dataset-name

Conversation

@romanlutz

Copy link
Copy Markdown
Contributor

Description

Jailbreak template seeds loaded by _JailbreakTemplatesDataset._load_seeds were previously created without a dataset_name, unlike seeds from other dataset providers. That left loaded jailbreak templates unattributed, so they could not be traced back to their source dataset once stored or queried in memory.

This sets seed.dataset_name = self.dataset_name on each template seed as it is loaded, so jailbreak template seeds carry the same dataset_name (jailbreak_templates) as the dataset they come from. The change is a one-line addition inside the existing load loop and does not alter loading, skip-on-invalid, or ordering behavior.

Tests and Documentation

  • Extended test_fetch_dataset_async_loads_templates_from_path to assert every loaded seed's dataset_name matches the dataset's dataset_name. The full tests/unit/datasets/test_jailbreak_dataset.py suite passes (8 passed).
  • Ran JupyText on doc/code/datasets/1_loading_datasets.py (jupytext --execute --set-kernel python3 --to notebook); it executes cleanly with no error outputs, and the regenerated 1_loading_datasets.ipynb is included in this PR.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 52d2518d-ebe5-4888-8189-6146b6503448
@adrian-gavrila adrian-gavrila self-assigned this Jul 16, 2026
Copilot AI and others added 2 commits July 16, 2026 19:51
@romanlutz
romanlutz enabled auto-merge July 17, 2026 03:37
@romanlutz
romanlutz added this pull request to the merge queue Jul 17, 2026
Merged via the queue into microsoft:main with commit 7c7a373 Jul 17, 2026
53 checks passed
@romanlutz
romanlutz deleted the romanlutz-validate-jailbreak-dataset-name branch July 17, 2026 04:15
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.

3 participants