mirror of
https://github.com/msoedov/agentic_security.git
synced 2026-09-30 11:51:46 +02:00
fix(makedir):
This commit is contained in:
1 parent
2bc0605a1d
commit
c5c5ae2e4b
1 file changed
+4
-1
@@ -248,6 +248,7 @@ def load_jailbreak_v28k() -> ProbeDataset:
|
|||||||
@cache_to_disk()
|
@cache_to_disk()
|
||||||
def load_local_csv() -> ProbeDataset:
|
def load_local_csv() -> ProbeDataset:
|
||||||
"""Load prompts from local CSV files."""
|
"""Load prompts from local CSV files."""
|
||||||
|
os.makedirs("./datasets", exist_ok=True)
|
||||||
csv_files = [f for f in os.listdir("./datasets") if f.endswith(".csv")]
|
csv_files = [f for f in os.listdir("./datasets") if f.endswith(".csv")]
|
||||||
logger.info(f"Found {len(csv_files)} CSV files: {csv_files}")
|
logger.info(f"Found {len(csv_files)} CSV files: {csv_files}")
|
||||||
|
|
||||||
@@ -337,7 +338,9 @@ class StenographyTransformer:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# Convert async generator (if any) to a list
|
# Convert async generator (if any) to a list
|
||||||
prompts = list(dataset.prompts) if hasattr(dataset.prompts, '__iter__') else []
|
prompts = (
|
||||||
|
list(dataset.prompts) if hasattr(dataset.prompts, "__iter__") else []
|
||||||
|
)
|
||||||
size = len(prompts)
|
size = len(prompts)
|
||||||
|
|
||||||
if size == 0:
|
if size == 0:
|
||||||
|
|||||||
Reference in new issue
Block a user