Skip to content

Commit

Permalink
Change dataloader in the experiment runner script. (#28)
Browse files Browse the repository at this point in the history
* change data loader

* nit

* minor refactoring

* edit docker builder

---------

Co-authored-by: blaise-muhirwa <[email protected]>
  • Loading branch information
BlaiseMuhirwa and blaise-muhirwa authored Feb 3, 2024
1 parent 607c160 commit dfdb148
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions bin/docker-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function get_tag_name() {

# Get the tag name
TAG_NAME=$(get_tag_name)
DATA_DIR=${DATA_DIR:-$(pwd)/data}

echo "Building docker image with tag name: $TAG_NAME"

Expand All @@ -71,11 +72,11 @@ if [ -z "$1" ]
then
# This will build the image and run the container with the default make target
# (i.e., print help message)
docker run -it --volume $(pwd)/data:/root/data --rm flatnav:$TAG_NAME make help
docker run -it --volume ${DATA_DIR}:/root/data --rm flatnav:$TAG_NAME make help
exit 0
fi


# Run the container and mount the data/ directory as volume to /root/data
# Pass the make target as argument to the container.
docker run -it --volume $(pwd)/data:/root/data --rm flatnav:$TAG_NAME make $1
docker run -it --volume ${DATA_DIR}:/root/data --rm flatnav:$TAG_NAME make $1
5 changes: 2 additions & 3 deletions experiments/run-big-bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,7 @@ def main(
)
index.reorder(strategies=reordering_strategies)

if num_search_threads > 1:
index.set_num_threads(num_search_threads)
index.set_num_threads(num_search_threads)

recall, qps = compute_metrics(
index=index,
Expand Down Expand Up @@ -437,7 +436,7 @@ def parse_arguments() -> argparse.Namespace:

args = parse_arguments()

train_data, queries, ground_truth = load_sift_dataset(
train_data, queries, ground_truth = load_benchmark_dataset(
train_dataset_path=args.dataset,
queries_path=args.queries,
gtruth_path=args.gtruth,
Expand Down

0 comments on commit dfdb148

Please sign in to comment.