cdqa-suite / cdQA

⛔ [NOT MAINTAINED] An End-To-End Closed Domain Question Answering System.
https://cdqa-suite.github.io/cdQA-website/
Apache License 2.0
616 stars 191 forks source link

Added functionallity to send model to GPU automatically #290

Closed andrelmfarias closed 5 years ago

andrelmfarias commented 5 years ago

This PR adds the functionality of sending the models to GPU automatically when creating a cdqa pipeline instance, if CUDA is avaiable.

With this functionality, we can eliminate the need for storing 2 versions of the same model (CPU and GPU). After this, we will need to have only a CPU version.

codecov[bot] commented 5 years ago

Codecov Report

Merging #290 into master will increase coverage by 2.25%. The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #290      +/-   ##
==========================================
+ Coverage   37.68%   39.93%   +2.25%     
==========================================
  Files          13       13              
  Lines        1871     1873       +2     
==========================================
+ Hits          705      748      +43     
+ Misses       1166     1125      -41
Impacted Files Coverage Δ
cdqa/pipeline/cdqa_sklearn.py 67.6% <50%> (-0.52%) :arrow_down:
cdqa/reader/bertqa_sklearn.py 48.69% <0%> (+6.08%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 376ae3a...3a39916. Read the comment docs.