Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docstring and fix generate grountruth #2377

Open
wants to merge 2 commits into
base: branch-24.10
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,18 @@ def main():
"The input and output files are in big-ann-benchmark's binary format.",
epilog="""Example usage
# With existing query file
python -m raft_ann_bench.generate_groundtruth --dataset /dataset/base.\
fbin --output=groundtruth_dir --queries=/dataset/query.public.10K.fbin
python -m raft_ann_bench.generate_groundtruth --output=groundtruth_dir \
--queries=/dataset/query.public.10K.fbin /dataset/base.fbin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What has changed here? I think we would like to keep the --dataset argument

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the change is correct, in the first version of this script dataset was a keyword argument, but it was later changed to a positional argument. Here the docstring is corrected to give dataset as a positional arg.


# With randomly generated queries
python -m raft_ann_bench.generate_groundtruth --dataset /dataset/base.\
fbin --output=groundtruth_dir --queries=random --n_queries=10000
python -m raft_ann_bench.generate_groundtruth --output=groundtruth_dir \
--queries=random --n_queries=10000 /dataset/base.fbin

# Using only a subset of the dataset. Define queries by randomly
# selecting vectors from the (subset of the) dataset.
python -m raft_ann_bench.generate_groundtruth --dataset /dataset/base.\
fbin --nrows=2000000 --cols=128 --output=groundtruth_dir \
--queries=random-choice --n_queries=10000
python -m raft_ann_bench.generate_groundtruth --nrows=2000000 \
--cols=128 --output=groundtruth_dir --queries=random-choice \
--n_queries=10000 /dataset/base.fbin
""",
formatter_class=argparse.RawDescriptionHelpFormatter,
)
Expand Down
Loading