From 6ef24987d4ca5d14c6d5fb743717b29182a7ca7c Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 13 Nov 2023 17:07:31 -0500 Subject: [PATCH 1/4] Adjusting end-to-end start time so it doesn't include stream creation time --- cpp/bench/ann/src/common/benchmark.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/bench/ann/src/common/benchmark.hpp b/cpp/bench/ann/src/common/benchmark.hpp index 1cbd54cb7b..7db5eab194 100644 --- a/cpp/bench/ann/src/common/benchmark.hpp +++ b/cpp/bench/ann/src/common/benchmark.hpp @@ -287,8 +287,8 @@ void bench_search(::benchmark::State& state, std::shared_ptr> neighbors = std::make_shared>(algo_property.query_memory_type, k * query_set_size); - auto start = std::chrono::high_resolution_clock::now(); cuda_timer gpu_timer; + auto start = std::chrono::high_resolution_clock::now(); { nvtx_case nvtx{state.name()}; From 356eefe9fea4592c924597e8b19dcb0df55cbc76 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 13 Nov 2023 19:31:04 -0500 Subject: [PATCH 2/4] Fixing error in data_export (not sure how this ended up getting into the code) --- .../raft-ann-bench/src/raft-ann-bench/data_export/__main__.py | 2 +- 1 file changed, 1 insertion(+), 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 fd6c2077e7..3a547938ce 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 @@ -114,7 +114,7 @@ def convert_json_to_csv_search(dataset, dataset_path): write["build cpu_time"] = None write["build GPU"] = None - for col_idx in range(5, len(build_df.columns)): + for col_idx in range(6, len(build_df.columns)): col_name = build_df.columns[col_idx] write[col_name] = None From 58a238f1e4212cccfa0dab31f0b4f376db218d41 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 13 Nov 2023 22:43:16 -0500 Subject: [PATCH 3/4] Fixing wiki-all-1M dataset --- python/raft-ann-bench/src/raft-ann-bench/run/conf/datasets.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/raft-ann-bench/src/raft-ann-bench/run/conf/datasets.yaml b/python/raft-ann-bench/src/raft-ann-bench/run/conf/datasets.yaml index a2b948a464..be63e1d535 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/run/conf/datasets.yaml +++ b/python/raft-ann-bench/src/raft-ann-bench/run/conf/datasets.yaml @@ -107,7 +107,7 @@ - name: wiki_all_1M dims: 768 - base_file: wiki_all_1M/base.1MM.fbin + base_file: wiki_all_1M/base.1M.fbin query_file: wiki_all_1M/queries.fbin groundtruth_neighbors_file: wiki_all_1M/groundtruth.1M.neighbors.ibin distance: euclidean From 7d4cbf87fe6af248ef716ce38503c3428d41726e Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 14 Nov 2023 01:39:37 -0500 Subject: [PATCH 4/4] Catching any potetnail json exceptions --- .../src/raft-ann-bench/data_export/__main__.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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 3a547938ce..4978c99d60 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 @@ -52,9 +52,15 @@ def read_file(dataset, dataset_path, method): for file in os.listdir(dir): if file.endswith(".json"): with open(os.path.join(dir, file), "r") as f: - data = json.load(f) - df = pd.DataFrame(data["benchmarks"]) - yield (os.path.join(dir, file), file.split("-")[0], df) + try: + data = json.load(f) + df = pd.DataFrame(data["benchmarks"]) + yield os.path.join(dir, file), file.split("-")[0], df + except Exception as e: + print( + "An error occurred processing file %s (%s). " + "Skipping..." % (file, e) + ) def convert_json_to_csv_build(dataset, dataset_path):