Giter Club home page Giter Club logo

dual-encoder-entity-retrieval-with-bert's People

Contributors

izuna385 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dual-encoder-entity-retrieval-with-bert's Issues

How to use model for inference?

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?

[ Bug ] AssertionError: The NVIDIA driver on your system is too old (found version 10010)

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.