From ed272c15018103e466e5957491a9dfe9c0a37b1a Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Wed, 29 Nov 2023 03:27:04 +0100 Subject: [PATCH] Fixing json parse error in `raft-ann-bench.data_export` (#2025) Authors: - Corey J. Nolet (https://github.com/cjnolet) Approvers: - Divye Gala (https://github.com/divyegala) URL: https://github.com/rapidsai/raft/pull/2025 --- .../raft-ann-bench/src/raft-ann-bench/data_export/__main__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/raft-ann-bench/src/raft-ann-bench/data_export/__main__.py b/python/raft-ann-bench/src/raft-ann-bench/data_export/__main__.py index 572b81bbe2..5cb06c573f 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/data_export/__main__.py +++ b/python/raft-ann-bench/src/raft-ann-bench/data_export/__main__.py @@ -68,7 +68,9 @@ def read_file(dataset, dataset_path, method): dir = os.path.join(dataset_path, dataset, "result", method) for file in os.listdir(dir): if file.endswith(".json"): - with open(os.path.join(dir, file), "r") as f: + with open( + os.path.join(dir, file), "r", encoding="ISO-8859-1" + ) as f: try: data = json.load(f) df = pd.DataFrame(data["benchmarks"])