parameterlab / trap

Source code of "TRAP: Targeted Random Adversarial Prompt Honeypot for Black-Box Identification", ACL2024 (findings)
MIT License
8 stars 0 forks source link

How can I get the suffixes Json file #1

Open Genihamber opened 2 months ago

Genihamber commented 2 months ago

I followed instruct and get the following error when compute true positive and false positive rates on open models
... raise ValueError(f'Empty directory no JSON files in: {path}') ValueError: Empty directory no JSON files in: ...

How can I get the suffixes Json file, I check the folder. It's only suffixes.csv file there, can't find json file.

Framartin commented 2 months ago

Hello @Genihamber , Thanks for your interest in our paper! I quickly modified utils.py to support the loading of CSV file in 0cd0f81322326dfb007e11d2b403dd15ced4629b . Let me know if this works for you.

I think the CSV files should be enough for basic use. The raw JSON files are quite verbose and heavy, but contain more information (like the suffix at each step). If the current CSV files are not enough, please tell me, and I will release a zip of all the JSON files somewhere.

I remain available if you have questions or issues.