Skip to content

Commit a52fcf6

Browse files
committed
Fix distance argument
1 parent 4ae3685 commit a52fcf6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/svsbench/build.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ def _read_args(argv: list[str] | None = None) -> argparse.Namespace:
4242
"--distance",
4343
choices=tuple(consts.STR_TO_DISTANCE.keys()),
4444
default="mip",
45-
type=consts.STR_TO_DISTANCE.get,
4645
)
4746
parser.add_argument(
4847
"--max_threads_init",
@@ -103,7 +102,7 @@ def main(argv: str | None = None) -> None:
103102
index, name = build_static(
104103
vecs_path=args.vecs_file,
105104
svs_type=args.svs_type,
106-
distance=args.distance,
105+
distance=consts.STR_TO_DISTANCE[args.distance],
107106
graph_max_degree=args.graph_max_degree,
108107
window_size=args.window_size,
109108
prune_to=args.prune_to,

0 commit comments

Comments
 (0)