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 e19ada2934..911b0c0ea2 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 @@ -18,6 +18,7 @@ import json import os import warnings +import sys import pandas as pd @@ -147,6 +148,9 @@ def main(): default=default_dataset_path, ) + if len(sys.argv)==1: + parser.print_help(sys.stderr) + sys.exit(1) args = parser.parse_args() convert_json_to_csv_build(args.dataset, args.dataset_path) diff --git a/python/raft-ann-bench/src/raft-ann-bench/generate_groundtruth/__main__.py b/python/raft-ann-bench/src/raft-ann-bench/generate_groundtruth/__main__.py index 77a930f81e..91f8cf04ce 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/generate_groundtruth/__main__.py +++ b/python/raft-ann-bench/src/raft-ann-bench/generate_groundtruth/__main__.py @@ -16,6 +16,7 @@ # import argparse import os +import sys import cupy as cp import numpy as np @@ -178,6 +179,9 @@ def main(): " commonly used with RAFT ANN are 'sqeuclidean' and 'inner_product'", ) + if len(sys.argv)==1: + parser.print_help(sys.stderr) + sys.exit(1) args = parser.parse_args() if args.rows is not None: diff --git a/python/raft-ann-bench/src/raft-ann-bench/get_dataset/__main__.py b/python/raft-ann-bench/src/raft-ann-bench/get_dataset/__main__.py index 4e6a0119b4..c16881bfb1 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/get_dataset/__main__.py +++ b/python/raft-ann-bench/src/raft-ann-bench/get_dataset/__main__.py @@ -16,6 +16,7 @@ import argparse import os import subprocess +import sys from urllib.request import urlretrieve @@ -101,6 +102,10 @@ def main(): help="normalize cosine distance to inner product", action="store_true", ) + + if len(sys.argv)==1: + parser.print_help(sys.stderr) + sys.exit(1) args = parser.parse_args() download(args.dataset, args.normalize, args.dataset_path) diff --git a/python/raft-ann-bench/src/raft-ann-bench/plot/__main__.py b/python/raft-ann-bench/src/raft-ann-bench/plot/__main__.py index 78f8aea8b8..30be3682cc 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/plot/__main__.py +++ b/python/raft-ann-bench/src/raft-ann-bench/plot/__main__.py @@ -22,6 +22,7 @@ import argparse import itertools import os +import sys from collections import OrderedDict import matplotlib as mpl @@ -486,6 +487,9 @@ def main(): action="store_true", ) + if len(sys.argv)==1: + parser.print_help(sys.stderr) + sys.exit(1) args = parser.parse_args() if args.algorithms: diff --git a/python/raft-ann-bench/src/raft-ann-bench/run/__main__.py b/python/raft-ann-bench/src/raft-ann-bench/run/__main__.py index 38f23ddbcd..3bdb6fd42d 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/run/__main__.py +++ b/python/raft-ann-bench/src/raft-ann-bench/run/__main__.py @@ -21,6 +21,7 @@ import uuid from importlib import import_module +import sys import warnings import yaml @@ -293,6 +294,9 @@ def main(): action="store_true", ) + if len(sys.argv)==1: + parser.print_help(sys.stderr) + sys.exit(1) args = parser.parse_args() # If both build and search are not provided, diff --git a/python/raft-ann-bench/src/raft-ann-bench/split_groundtruth/__main__.py b/python/raft-ann-bench/src/raft-ann-bench/split_groundtruth/__main__.py index b886d40ea7..9efac1225c 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/split_groundtruth/__main__.py +++ b/python/raft-ann-bench/src/raft-ann-bench/split_groundtruth/__main__.py @@ -16,6 +16,7 @@ import argparse import os import subprocess +import sys def split_groundtruth(groundtruth_filepath): @@ -43,6 +44,10 @@ def main(): help="Path to billion-scale dataset groundtruth file", required=True, ) + + if len(sys.argv)==1: + parser.print_help(sys.stderr) + sys.exit(1) args = parser.parse_args() split_groundtruth(args.groundtruth)