Skip to content

Commit

Permalink
change package name to raft_ann_bench
Browse files Browse the repository at this point in the history
  • Loading branch information
divyegala committed May 23, 2024
1 parent f17dd03 commit 5ef0cb6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions context/raft-ann-bench/get_datasets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ set -eo pipefail

export CONDA_PREFIX=/opt/conda

python -m raft-ann-bench.get_dataset --dataset deep-image-96-angular --normalize --dataset-path /home/rapids/preloaded_datasets
python -m raft-ann-bench.get_dataset --dataset fashion-mnist-784-euclidean --dataset-path /home/rapids/preloaded_datasets
python -m raft-ann-bench.get_dataset --dataset glove-50-angular --normalize --dataset-path /home/rapids/preloaded_datasets
python -m raft-ann-bench.get_dataset --dataset glove-100-angular --normalize --dataset-path /home/rapids/preloaded_datasets
python -m raft-ann-bench.get_dataset --dataset mnist-784-euclidean --dataset-path /home/rapids/preloaded_datasets
python -m raft-ann-bench.get_dataset --dataset nytimes-256-angular --normalize --dataset-path /home/rapids/preloaded_datasets
python -m raft-ann-bench.get_dataset --dataset sift-128-euclidean --dataset-path /home/rapids/preloaded_datasets
python -m raft_ann_bench.get_dataset --dataset deep-image-96-angular --normalize --dataset-path /home/rapids/preloaded_datasets
python -m raft_ann_bench.get_dataset --dataset fashion-mnist-784-euclidean --dataset-path /home/rapids/preloaded_datasets
python -m raft_ann_bench.get_dataset --dataset glove-50-angular --normalize --dataset-path /home/rapids/preloaded_datasets
python -m raft_ann_bench.get_dataset --dataset glove-100-angular --normalize --dataset-path /home/rapids/preloaded_datasets
python -m raft_ann_bench.get_dataset --dataset mnist-784-euclidean --dataset-path /home/rapids/preloaded_datasets
python -m raft_ann_bench.get_dataset --dataset nytimes-256-angular --normalize --dataset-path /home/rapids/preloaded_datasets
python -m raft_ann_bench.get_dataset --dataset sift-128-euclidean --dataset-path /home/rapids/preloaded_datasets
8 changes: 4 additions & 4 deletions context/raft-ann-bench/run_benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export RUN_ARGS=$3
export PLOT_ARGS=$4

# (1) prepare dataset.
python -m raft-ann-bench.get_dataset ${DATASET_ARG} ${GET_DATASET_ARGS} --dataset-path /data/benchmarks/datasets
python -m raft_ann_bench.get_dataset ${DATASET_ARG} ${GET_DATASET_ARGS} --dataset-path /data/benchmarks/datasets

if [[ "$DATASET_ARG" == *"angular"* ]]; then
export DATASET_ARG=${DATASET_ARG/angular/inner}
Expand All @@ -30,10 +30,10 @@ if [[ "$DATASET_ARG" == *"angular"* ]]; then
fi

# (2) build and search index
python -m raft-ann-bench.run ${DATASET_ARG} --dataset-path /data/benchmarks/datasets --force ${RUN_ARGS}
python -m raft_ann_bench.run ${DATASET_ARG} --dataset-path /data/benchmarks/datasets --force ${RUN_ARGS}

# (3) export data
python -m raft-ann-bench.data_export ${DATASET_ARG} --dataset-path /data/benchmarks/datasets
python -m raft_ann_bench.data_export ${DATASET_ARG} --dataset-path /data/benchmarks/datasets

# Extract the algorithms from the run command to use in the plot command
ALGOS=$(grep -oP "algorithms\s+\K(\w+,?\w+)" <<< "$RUN_ARGS")
Expand All @@ -44,4 +44,4 @@ fi
# (4) plot results
mkdir -p /data/benchmarks/datasets/result
cd /data/benchmarks/datasets/result
python -m raft-ann-bench.plot ${DATASET_ARG} ${ALGOS} ${PLOT_ARGS} --dataset-path /data/benchmarks/datasets --build --search
python -m raft_ann_bench.plot ${DATASET_ARG} ${ALGOS} ${PLOT_ARGS} --dataset-path /data/benchmarks/datasets --build --search
8 changes: 4 additions & 4 deletions context/raft-ann-bench/run_benchmarks_preloaded_datasets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ case $DATASET_ARG in
export DATASET_PATH=/home/rapids/preloaded_datasets ;;
*)
export DATASET_PATH=/data/benchmarks/datasets
python -m raft-ann-bench.get_dataset ${DATASET_ARG} ${GET_DATASET_ARGS} --dataset-path $DATASET_PATH ;;
python -m raft_ann_bench.get_dataset ${DATASET_ARG} ${GET_DATASET_ARGS} --dataset-path $DATASET_PATH ;;
esac

if [[ "$DATASET_ARG" == *"angular"* ]]; then
Expand All @@ -37,10 +37,10 @@ if [[ "$DATASET_ARG" == *"angular"* ]]; then
fi

# (2) build and search index
python -m raft-ann-bench.run ${DATASET_ARG} --dataset-path $DATASET_PATH ${RUN_ARGS}
python -m raft_ann_bench.run ${DATASET_ARG} --dataset-path $DATASET_PATH ${RUN_ARGS}

# (3) export data
python -m raft-ann-bench.data_export ${DATASET_ARG} --dataset-path $DATASET_PATH
python -m raft_ann_bench.data_export ${DATASET_ARG} --dataset-path $DATASET_PATH

# Extract the algorithms from the run command to use in the plot command
ALGOS=$(grep -oP "algorithms\s+\K(\w+,?\w+)" <<< "$RUN_ARGS")
Expand All @@ -51,4 +51,4 @@ fi
# (4) plot results
mkdir -p $DATASET_PATH/result
cd $DATASET_PATH/result
python -m raft-ann-bench.plot ${DATASET_ARG} ${ALGOS} ${PLOT_ARGS} --dataset-path $DATASET_PATH
python -m raft_ann_bench.plot ${DATASET_ARG} ${ALGOS} ${PLOT_ARGS} --dataset-path $DATASET_PATH

0 comments on commit 5ef0cb6

Please sign in to comment.