Skip to content

Commit

Permalink
fix create_pointset for throughput mode (#589)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jiangyinzuo authored Jan 24, 2025
1 parent 2f18645 commit b4b3d49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/cuvs_bench/cuvs_bench/run/data_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,13 @@ def create_pointset(data, xn, yn):
Filtered list of data points sorted by x and y metrics.
"""
xm, ym = metrics[xn], metrics[yn]
y_col = 4 if yn == "latency" else 3

rev_x, rev_y = (-1 if xm["worst"] < 0 else 1), (
-1 if ym["worst"] < 0 else 1
)
# Sort data based on x and y metrics
data.sort(key=lambda t: (rev_y * t[4], rev_x * t[2]))
data.sort(key=lambda t: (rev_y * t[y_col], rev_x * t[2]))
lines = []
last_x = xm["worst"]
comparator = (
Expand Down

0 comments on commit b4b3d49

Please sign in to comment.