Skip to content

Commit 9bc03c0

Browse files
romanlutzCopilot
andauthored
REFACTOR rename SeedDatasetProvider.fetch_dataset to fetch_dataset_async (#1735)
Co-authored-by: romanlutz <romanlutz@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ac65f07 commit 9bc03c0

71 files changed

Lines changed: 321 additions & 177 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

doc/code/datasets/4_dataset_coding.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
" def dataset_name(self) -> str:\n",
6868
" return \"dark_bench\"\n",
6969
"\n",
70-
" async def fetch_dataset(self, *, cache: bool = True) -> SeedDataset:\n",
70+
" async def fetch_dataset_async(self, *, cache: bool = True) -> SeedDataset:\n",
7171
" # Fetch from HuggingFace\n",
7272
" data = await self._fetch_from_huggingface(\n",
7373
" dataset_name=\"apart/darkbench\",\n",

doc/code/datasets/4_dataset_coding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class SimpleDarkBench(_RemoteDatasetLoader):
6464
def dataset_name(self) -> str:
6565
return "dark_bench"
6666

67-
async def fetch_dataset(self, *, cache: bool = True) -> SeedDataset:
67+
async def fetch_dataset_async(self, *, cache: bool = True) -> SeedDataset:
6868
# Fetch from HuggingFace
6969
data = await self._fetch_from_huggingface(
7070
dataset_name="apart/darkbench",

pyrit/datasets/seed_datasets/local/local_dataset_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def dataset_name(self) -> str:
5353
"""Return the dataset name."""
5454
return self._dataset_name
5555

56-
async def fetch_dataset(self, *, cache: bool = True) -> SeedDataset:
56+
async def fetch_dataset_async(self, *, cache: bool = True) -> SeedDataset:
5757
"""
5858
Load the dataset from the local YAML file.
5959

pyrit/datasets/seed_datasets/remote/aegis_ai_content_safety_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def dataset_name(self) -> str:
120120
"""Return the dataset name."""
121121
return "aegis_content_safety"
122122

123-
async def fetch_dataset(self, *, cache: bool = True) -> SeedDataset:
123+
async def fetch_dataset_async(self, *, cache: bool = True) -> SeedDataset:
124124
"""
125125
Fetch NVIDIA Aegis AI Content Safety dataset with optional filtering and return as SeedDataset.
126126

pyrit/datasets/seed_datasets/remote/aya_redteaming_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def dataset_name(self) -> str:
8484
"""Return the dataset name."""
8585
return "aya_redteaming"
8686

87-
async def fetch_dataset(self, *, cache: bool = True) -> SeedDataset:
87+
async def fetch_dataset_async(self, *, cache: bool = True) -> SeedDataset:
8888
"""
8989
Fetch Aya Red-teaming dataset with optional filtering and return as SeedDataset.
9090

pyrit/datasets/seed_datasets/remote/babelscape_alert_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def dataset_name(self) -> str:
5151
"""Return the dataset name."""
5252
return "babelscape_alert"
5353

54-
async def fetch_dataset(self, *, cache: bool = True) -> SeedDataset:
54+
async def fetch_dataset_async(self, *, cache: bool = True) -> SeedDataset:
5555
"""
5656
Fetch Babelscape ALERT dataset and return as SeedDataset.
5757

pyrit/datasets/seed_datasets/remote/beaver_tails_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def dataset_name(self) -> str:
5252
"""Return the dataset name."""
5353
return "beaver_tails"
5454

55-
async def fetch_dataset(self, *, cache: bool = True) -> SeedDataset:
55+
async def fetch_dataset_async(self, *, cache: bool = True) -> SeedDataset:
5656
"""
5757
Fetch BeaverTails dataset from HuggingFace and return as SeedDataset.
5858

pyrit/datasets/seed_datasets/remote/cbt_bench_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def dataset_name(self) -> str:
5252
"""Return the dataset name."""
5353
return "cbt_bench"
5454

55-
async def fetch_dataset(self, *, cache: bool = True) -> SeedDataset:
55+
async def fetch_dataset_async(self, *, cache: bool = True) -> SeedDataset:
5656
"""
5757
Fetch CBT-Bench dataset from HuggingFace and return as SeedDataset.
5858

pyrit/datasets/seed_datasets/remote/ccp_sensitive_prompts_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def dataset_name(self) -> str:
3939
"""Return the dataset name."""
4040
return "ccp_sensitive_prompts"
4141

42-
async def fetch_dataset(self, *, cache: bool = True) -> SeedDataset:
42+
async def fetch_dataset_async(self, *, cache: bool = True) -> SeedDataset:
4343
"""
4444
Fetch CCP-sensitive prompts dataset and return as SeedDataset.
4545

pyrit/datasets/seed_datasets/remote/comic_jailbreak_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def dataset_name(self) -> str:
137137
"""Return the dataset name."""
138138
return "comic_jailbreak"
139139

140-
async def fetch_dataset(self, *, cache: bool = True) -> SeedDataset:
140+
async def fetch_dataset_async(self, *, cache: bool = True) -> SeedDataset:
141141
"""
142142
Fetch ComicJailbreak dataset and return as SeedDataset of image+text pairs.
143143

0 commit comments

Comments
 (0)