From 27e3cfa6ebeca912305f156e9f743fbb05efa94c Mon Sep 17 00:00:00 2001 From: Shengye Wan Date: Fri, 12 Jan 2024 06:44:04 -0800 Subject: [PATCH] Add indent for the middle step: writing ICD responses in files Summary: Before this change, we used to write the result of one prompt as a dictionary in a single-line format for ICD-autocomplete and ICD-instruct benchmarks, which were not aligned with our final result format or MITRE format. (see test plan below). This change fixes that difference. Reviewed By: YueLi28 Differential Revision: D52706326 fbshipit-source-id: c85388d72349e06e89d04f6d95f2b9b365e1c726 --- .../benchmark/instruct_or_autocomplete_benchmark.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CybersecurityBenchmarks/benchmark/instruct_or_autocomplete_benchmark.py b/CybersecurityBenchmarks/benchmark/instruct_or_autocomplete_benchmark.py index 2af8ed312..9cc7b0a11 100644 --- a/CybersecurityBenchmarks/benchmark/instruct_or_autocomplete_benchmark.py +++ b/CybersecurityBenchmarks/benchmark/instruct_or_autocomplete_benchmark.py @@ -41,7 +41,7 @@ def query_llm_to_generate_responses( ) ) - self.response_path.write_text(json.dumps(response_result)) + self.response_path.write_text(json.dumps(response_result, indent=4)) async def run(self) -> None: # noqa: C901 """