Skip to content

Commit b4b3d49

Browse files
authored
fix create_pointset for throughput mode (#589)
The columns of raw.csv file are `algo_name,index_name,recall,throughput,latency,...` `col 4` is latency and `col 3` is throughput. Authors: - Yinzuo Jiang (https://github.com/jiangyinzuo) - Corey J. Nolet (https://github.com/cjnolet) Approvers: - Divye Gala (https://github.com/divyegala) URL: #589
1 parent 2f18645 commit b4b3d49

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/cuvs_bench/cuvs_bench/run/data_export.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,13 @@ def create_pointset(data, xn, yn):
256256
Filtered list of data points sorted by x and y metrics.
257257
"""
258258
xm, ym = metrics[xn], metrics[yn]
259+
y_col = 4 if yn == "latency" else 3
260+
259261
rev_x, rev_y = (-1 if xm["worst"] < 0 else 1), (
260262
-1 if ym["worst"] < 0 else 1
261263
)
262264
# Sort data based on x and y metrics
263-
data.sort(key=lambda t: (rev_y * t[4], rev_x * t[2]))
265+
data.sort(key=lambda t: (rev_y * t[y_col], rev_x * t[2]))
264266
lines = []
265267
last_x = xm["worst"]
266268
comparator = (

0 commit comments

Comments
 (0)