File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
agentic_security/probe_data Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,7 @@ def load_jailbreak_v28k() -> ProbeDataset:
248248@cache_to_disk ()
249249def 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 :
You can’t perform that action at this time.
0 commit comments