Skip to content

Commit c5c5ae2

Browse files
committed
fix(makedir):
1 parent 2bc0605 commit c5c5ae2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

agentic_security/probe_data/data.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ def load_jailbreak_v28k() -> ProbeDataset:
248248
@cache_to_disk()
249249
def load_local_csv() -> ProbeDataset:
250250
"""Load prompts from local CSV files."""
251+
os.makedirs("./datasets", exist_ok=True)
251252
csv_files = [f for f in os.listdir("./datasets") if f.endswith(".csv")]
252253
logger.info(f"Found {len(csv_files)} CSV files: {csv_files}")
253254

@@ -337,7 +338,9 @@ def transform(self) -> Iterator[ProbeDataset]:
337338
continue
338339

339340
# Convert async generator (if any) to a list
340-
prompts = list(dataset.prompts) if hasattr(dataset.prompts, '__iter__') else []
341+
prompts = (
342+
list(dataset.prompts) if hasattr(dataset.prompts, "__iter__") else []
343+
)
341344
size = len(prompts)
342345

343346
if size == 0:

0 commit comments

Comments
 (0)