izuna385 / dual-encoder-entity-retrieval-with-bert Goto Github PK
View Code? Open in Web Editor NEWRe-implementation of Bi- (or, Dual-) encoder for Entity Linking. You can run experiments only in 3 seconds.
License: MIT License
Re-implementation of Bi- (or, Dual-) encoder for Entity Linking. You can run experiments only in 3 seconds.
License: MIT License
I tried to run the basic example on the README.md of this repository under pytorch Docker containers ( both on CUDA 10 and CUDA 9 ).
I keep on getting the same error no matter what particular setup I choose:
AssertionError:
The NVIDIA driver on your system is too old (found version 10010).
Please update your GPU driver by downloading and installing a new
version from the URL: http://www.nvidia.com/Download/index.aspx
Alternatively, go to: https://pytorch.org to install
a PyTorch version that has been compiled with your version
of the CUDA driver.
I tried to run these containers on several distinct machines ( even on Google Cloud ). All of them had the latest NVIDIA drivers, so this error message doesn't make sense to me.
Full traceback:
(myenv) root@79c9081baa1f:/home/repositories/Dual-encoder-Entity-Retrieval-with-BERT# CUDA_VISIBLE_DEVICES=0 python train.py -num_epochs 1
===PARAMETERS===
debug False
debug_for_entity_encoder False
dataset xxx
cached_instance False
lr 5e-06
weight_decay 1e-08
beta1 0.9
beta2 0.999
epsilon 1e-08
amsgrad False
word_embedding_dropout 0.1
scalingMSEfactor 1.0
save_model 1
cuda_devices 0
num_epochs 1
batch_size_for_train 32
batch_size_for_eval 32
allen_lazyload False
bert_name bert-base-uncased
max_context_len 80
max_mention_len 12
max_left_context_len 35
max_right_context_len 35
max_canonical_len 12
max_def_len 48
experiment_logdir ./experiment_logdir/
mention_dump_dir ./mention_dump_dir/
kbemb_dim 300
search_method_for_faiss_during_construct_smallKBfortrain cossim
negatives_for_knn 500
cand_num_for_knn 10000
model_for_training blink_implementation_inbatchencoder
biencoder_scoring cossim
negatives_during_train_fixednegatives_biencoder 15
cand_num_before_sort_candidates_forBLINKbiencoder 10000
search_method_before_re_sorting_for_faiss cossim
add_mse 0
===PARAMETERS END===
100%|##########| 231508/231508 [00:00<00:00, 343186.00B/s]
loading KB
set value and load original KB
original KB loaded
2it [00:00, 492.49it/s]
2it [00:00, 455.93it/s]
train statistics: 2
100%|##########| 433/433 [00:00<00:00, 355129.77B/s]
100%|##########| 440473133/440473133 [01:43<00:00, 4244053.22B/s]
100%|##########| 407873900/407873900 [01:08<00:00, 5982382.98B/s]
Traceback (most recent call last):
File "train.py", line 121, in <module>
main()
File "train.py", line 55, in main
model = model.cuda()
File "/opt/conda/envs/myenv/lib/python3.7/site-packages/torch/nn/modules/module.py", line 458, in cuda
return self._apply(lambda t: t.cuda(device))
File "/opt/conda/envs/myenv/lib/python3.7/site-packages/torch/nn/modules/module.py", line 354, in _apply
module._apply(fn)
File "/opt/conda/envs/myenv/lib/python3.7/site-packages/torch/nn/modules/module.py", line 354, in _apply
module._apply(fn)
File "/opt/conda/envs/myenv/lib/python3.7/site-packages/torch/nn/modules/module.py", line 354, in _apply
module._apply(fn)
[Previous line repeated 1 more time]
File "/opt/conda/envs/myenv/lib/python3.7/site-packages/torch/nn/modules/module.py", line 376, in _apply
param_applied = fn(param)
File "/opt/conda/envs/myenv/lib/python3.7/site-packages/torch/nn/modules/module.py", line 458, in <lambda>
return self._apply(lambda t: t.cuda(device))
File "/opt/conda/envs/myenv/lib/python3.7/site-packages/torch/cuda/__init__.py", line 186, in _lazy_init
_check_driver()
File "/opt/conda/envs/myenv/lib/python3.7/site-packages/torch/cuda/__init__.py", line 77, in _check_driver
of the CUDA driver.""".format(str(torch._C._cuda_getDriverVersion())))
AssertionError:
The NVIDIA driver on your system is too old (found version 10010).
Please update your GPU driver by downloading and installing a new
version from the URL: http://www.nvidia.com/Download/index.aspx
Alternatively, go to: https://pytorch.org to install
a PyTorch version that has been compiled with your version
of the CUDA driver.
It seems to me that hard negative mining is not implemented on this repository, although it is implemented on izuna385/Zero-Shot-Entity-Linking . Am I right?
Konichiwa,
I manage to train your model with my own dataset. How you would use the trained model for inference? that is how to use the model to detect(and link) entities of a text?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.