Closed sxysxy closed 1 year ago
经过测试,在环境配置为 pytorch==1.12.0+cu116 时会出现这个错误,不仅仅是 “--dataset-impl” 参数无法被识别,其他参数也会出现该问题。而后,我发现在重新执行 pip install --editable . 时会出现编译错误。因此,我猜测这个问题与环境配置有关。
而后,我在 pytorch==1.7.1+cu110 下进行测试,发现可以成功构建数据库。 此外,关于 faiss-gpu,建议使用 conda install faiss-gpu cudatoolkit=11.0 -c pytorch 来进行安装
以下是我的环境配置:
# packages in environment at /home/lines/anaconda3/envs/knnmt:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main
antlr4-python3-runtime 4.9.3 <pip>
blas 1.0 mkl
ca-certificates 2023.05.30 h06a4308_0
cffi 1.15.1 <pip>
colorama 0.4.6 <pip>
cudatoolkit 11.0.221 h6bb024c_0
Cython 0.29.36 <pip>
dataclasses 0.6 <pip>
fairseq 0.10.1 <pip>
faiss-gpu 1.7.1 py3.8_h293177f_1_cuda11.0 pytorch
hydra-core 1.3.2 <pip>
importlib-resources 5.12.0 <pip>
intel-openmp 2021.4.0 h06a4308_3561
libedit 3.1.20210910 h7f8727e_0
libfaiss 1.7.1 h7f34bec_1_cuda11.0 pytorch
libffi 3.2.1 hf484d3e_1007
libgcc-ng 9.1.0 hdf63c60_0
libstdcxx-ng 9.1.0 hdf63c60_0
lxml 4.9.3 <pip>
mkl 2021.4.0 h06a4308_640
mkl-service 2.4.0 py38h7f8727e_0
mkl_fft 1.3.1 py38hd3c417c_0
mkl_random 1.2.2 py38h51133e4_0
ncurses 6.3 h7f8727e_2
numpy 1.22.3 py38he7a7128_0
numpy 1.24.4 <pip>
numpy-base 1.22.3 py38hf524024_0
omegaconf 2.3.0 <pip>
openssl 1.1.1u h7f8727e_0
packaging 23.1 <pip>
Pillow 10.0.0 <pip>
pip 23.1.2 py38h06a4308_0
portalocker 2.7.0 <pip>
pycparser 2.21 <pip>
python 3.8.0 h0371630_2
PyYAML 6.0 <pip>
readline 7.0 h7b6447c_5
regex 2023.6.3 <pip>
sacrebleu 2.3.1 <pip>
setuptools 67.8.0 py38h06a4308_0
six 1.16.0 pyhd3eb1b0_1
sqlite 3.33.0 h62c20be_0
tabulate 0.9.0 <pip>
tk 8.6.12 h1ccaba5_0
torch 1.7.1+cu110 <pip>
torchvision 0.8.2+cu110 <pip>
tqdm 4.65.0 <pip>
typing_extensions 4.7.1 <pip>
wheel 0.38.4 py38h06a4308_0
xz 5.2.5 h7f8727e_1
zipp 3.15.0 <pip>
zlib 1.2.12 h7f8727e_2
也参考 https://github.com/facebookresearch/fairseq/issues/4032 ,将 python 从 3.9 降到 3.7 。经过测试,在环境配置为 python3.7 + pytorch==1.11.0 + cu113 下,我可以成功构建数据库
Description
I first cloned your repo and download pretrained model and dataset, placed them as following folder structure:
And I followed instructions in readme.md to build base datastore, it reported error:
Then I modified revisedkey-scripts/save_datastore.py, add sys.path.insert(2, "..")
Then I re-run
bash build_datastore.sh base koran
, it still reported error:It seems that the argument parser does not accept mmap for --dataset-impl ?
Unable to continue, what should I do to run your code? Thanks a lot for help!