Skip to content

Commit

Permalink
FIX use __path__ instead of __file__ because cuvs-bench has an empty …
Browse files Browse the repository at this point in the history
…__file__
  • Loading branch information
dantegd committed Dec 19, 2024
1 parent c8e0af0 commit fcddc40
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions context/cuvs-bench/get_datasets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

set -eo pipefail

# find cuVS in the environment
PACKAGE_FILE_PATH=$(python -c "import cuvs_bench; print(cuvs_bench.__file__)")
PACKAGE_DIR=$(dirname "$PACKAGE_FILE_PATH")
# find cuVS-bench in the environment
# __file__ is empty, so we use __path__
PACKAGE_FILE_PATH=$(python -c "import cuvs_bench; print(list(cuvs_bench.__path__)[0])")

# Apply the patch
patch "$PACKAGE_DIR/get_dataset/__main__.py" < /home/rapids/cuvs-bench/cuvs_bench_get_dataset.patch
patch "$PACKAGE_FILE_PATH/get_dataset/__main__.py" < /home/rapids/cuvs-bench/cuvs_bench_get_dataset.patch

python -m cuvs_bench.get_dataset --dataset deep-image-96-angular --normalize --dataset-path /home/rapids/preloaded_datasets
python -m cuvs_bench.get_dataset --dataset fashion-mnist-784-euclidean --dataset-path /home/rapids/preloaded_datasets
Expand Down

0 comments on commit fcddc40

Please sign in to comment.