mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-09-25 16:15:35 +00:00
Bump FARM version to 0.4.8 and PyTorch >=1.5.1, <= 1.6.0 (#376)
* bump farm version to 0.4.8 * move back to original transformers pipeline * remove dpr_utils and use transformers implementation * update tutorial notebooks
This commit is contained in:
parent
de5ad42e46
commit
bde33ddaaa
@ -1,6 +1,6 @@
|
||||
from typing import List, Optional
|
||||
|
||||
from haystack.reader.transformers_utils import pipeline
|
||||
from transformers import pipeline
|
||||
|
||||
from haystack.database.base import Document
|
||||
from haystack.reader.base import BaseReader
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -7,12 +7,11 @@ from pathlib import Path
|
||||
from farm.infer import Inferencer
|
||||
|
||||
from haystack.database.base import Document, BaseDocumentStore
|
||||
from haystack.database.elasticsearch import ElasticsearchDocumentStore
|
||||
from haystack.retriever.base import BaseRetriever
|
||||
from haystack.retriever.sparse import logger
|
||||
|
||||
from haystack.retriever.dpr_utils import DPRContextEncoder, DPRQuestionEncoder, DPRConfig, DPRContextEncoderTokenizer, \
|
||||
DPRQuestionEncoderTokenizer
|
||||
from transformers.modeling_dpr import DPRContextEncoder, DPRQuestionEncoder
|
||||
from transformers.tokenization_dpr import DPRContextEncoderTokenizer, DPRQuestionEncoderTokenizer
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
farm==0.4.7
|
||||
farm==0.4.8
|
||||
--find-links=https://download.pytorch.org/whl/torch_stable.html
|
||||
fastapi
|
||||
uvicorn
|
||||
@ -19,4 +19,4 @@ python-docx
|
||||
sqlalchemy_utils
|
||||
# for using FAISS with GPUs, install faiss-gpu
|
||||
faiss-cpu
|
||||
tika
|
||||
tika
|
||||
|
@ -31,7 +31,7 @@
|
||||
"\n",
|
||||
"# Install the latest master of Haystack and install the version of torch that works with the colab GPUs\n",
|
||||
"!pip install git+https://github.com/deepset-ai/haystack.git\n",
|
||||
"!pip install torch==1.5.1+cu101 torchvision==0.6.1+cu101 -f https://download.pytorch.org/whl/torch_stable.html"
|
||||
"!pip install torch==1.6.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
"\n",
|
||||
"# Install the latest master of Haystack and install the version of torch that works with the colab GPUs\n",
|
||||
"!pip install git+https://github.com/deepset-ai/haystack.git\n",
|
||||
"!pip install torch==1.5.1+cu101 torchvision==0.6.1+cu101 -f https://download.pytorch.org/whl/torch_stable.html"
|
||||
"!pip install torch==1.6.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
"\n",
|
||||
"# Install the latest master of Haystack and install the version of torch that works with the colab GPUs\n",
|
||||
"!pip install git+https://github.com/deepset-ai/haystack.git\n",
|
||||
"!pip install torch==1.5.1+cu101 torchvision==0.6.1+cu101 -f https://download.pytorch.org/whl/torch_stable.html"
|
||||
"!pip install torch==1.6.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -32,7 +32,7 @@
|
||||
"\n",
|
||||
"# Install the latest master of Haystack and install the version of torch that works with the colab GPUs\n",
|
||||
"!pip install git+https://github.com/deepset-ai/haystack.git\n",
|
||||
"!pip install torch==1.5.1+cu101 torchvision==0.6.1+cu101 -f https://download.pytorch.org/whl/torch_stable.html"
|
||||
"!pip install torch==1.6.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -44,7 +44,7 @@
|
||||
"\n",
|
||||
"# Install the latest master of Haystack and install the version of torch that works with the colab GPUs\n",
|
||||
"!pip install git+https://github.com/deepset-ai/haystack.git\n",
|
||||
"!pip install torch==1.5.1+cu101 torchvision==0.6.1+cu101 -f https://download.pytorch.org/whl/torch_stable.html"
|
||||
"!pip install torch==1.6.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -242,12 +242,12 @@
|
||||
"Requirement already satisfied: pyrsistent>=0.14.0 in /home/ubuntu/py3_6/lib/python3.6/site-packages (from jsonschema->flask-restplus->farm==0.4.6->farm-haystack==0.3.0) (0.16.0)\n",
|
||||
"Requirement already satisfied: smmap<4,>=3.0.1 in /home/ubuntu/py3_6/lib/python3.6/site-packages (from gitdb<5,>=4.0.1->gitpython>=2.1.0->mlflow==1.0.0->farm==0.4.6->farm-haystack==0.3.0) (3.0.4)\n",
|
||||
"Building wheels for collected packages: farm-haystack\n",
|
||||
" Building wheel for farm-haystack (setup.py) ... \u001b[?25ldone\n",
|
||||
"\u001b[?25h Created wheel for farm-haystack: filename=farm_haystack-0.3.0-py3-none-any.whl size=99007 sha256=c46bad086db77ddc557d67d6a47b0e8ead6a76c20451e21bd7e56e7b3adf5434\n",
|
||||
" Building wheel for farm-haystack (setup.py) ... \u001B[?25ldone\n",
|
||||
"\u001B[?25h Created wheel for farm-haystack: filename=farm_haystack-0.3.0-py3-none-any.whl size=99007 sha256=c46bad086db77ddc557d67d6a47b0e8ead6a76c20451e21bd7e56e7b3adf5434\n",
|
||||
" Stored in directory: /tmp/pip-ephem-wheel-cache-s2p1ltpe/wheels/5b/d7/60/7a15bd24f2905dfa70aa762413b9570b9d37add064b151aaf0\n",
|
||||
"Successfully built farm-haystack\n",
|
||||
"\u001b[33mWARNING: You are using pip version 20.1.1; however, version 20.2.2 is available.\n",
|
||||
"You should consider upgrading via the '/home/ubuntu/py3_6/bin/python3.6 -m pip install --upgrade pip' command.\u001b[0m\n"
|
||||
"\u001B[33mWARNING: You are using pip version 20.1.1; however, version 20.2.2 is available.\n",
|
||||
"You should consider upgrading via the '/home/ubuntu/py3_6/bin/python3.6 -m pip install --upgrade pip' command.\u001B[0m\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -257,11 +257,11 @@
|
||||
"Looking in links: https://download.pytorch.org/whl/torch_stable.html\n",
|
||||
"Collecting torch==1.5.1+cu101\n",
|
||||
" Downloading https://download.pytorch.org/whl/cu101/torch-1.5.1%2Bcu101-cp36-cp36m-linux_x86_64.whl (704.4 MB)\n",
|
||||
"\u001b[K |████████████████████████████████| 704.4 MB 9.3 kB/s eta 0:00:011\n",
|
||||
"\u001b[?25hCollecting torchvision==0.6.1+cu101\n",
|
||||
"\u001B[K |████████████████████████████████| 704.4 MB 9.3 kB/s eta 0:00:011\n",
|
||||
"\u001B[?25hCollecting torchvision==0.6.1+cu101\n",
|
||||
" Downloading https://download.pytorch.org/whl/cu101/torchvision-0.6.1%2Bcu101-cp36-cp36m-linux_x86_64.whl (6.6 MB)\n",
|
||||
"\u001b[K |████████████████████████████████| 6.6 MB 881 kB/s eta 0:00:01\n",
|
||||
"\u001b[?25hRequirement already satisfied: numpy in /home/ubuntu/py3_6/lib/python3.6/site-packages (from torch==1.5.1+cu101) (1.19.0)\n",
|
||||
"\u001B[K |████████████████████████████████| 6.6 MB 881 kB/s eta 0:00:01\n",
|
||||
"\u001B[?25hRequirement already satisfied: numpy in /home/ubuntu/py3_6/lib/python3.6/site-packages (from torch==1.5.1+cu101) (1.19.0)\n",
|
||||
"Requirement already satisfied: future in /home/ubuntu/py3_6/lib/python3.6/site-packages (from torch==1.5.1+cu101) (0.18.2)\n",
|
||||
"Requirement already satisfied: pillow>=4.1.1 in /home/ubuntu/py3_6/lib/python3.6/site-packages (from torchvision==0.6.1+cu101) (7.2.0)\n",
|
||||
"Installing collected packages: torch, torchvision\n",
|
||||
@ -270,8 +270,8 @@
|
||||
" Uninstalling torch-1.5.1:\n",
|
||||
" Successfully uninstalled torch-1.5.1\n",
|
||||
"Successfully installed torch-1.5.1+cu101 torchvision-0.6.1+cu101\n",
|
||||
"\u001b[33mWARNING: You are using pip version 20.1.1; however, version 20.2.2 is available.\n",
|
||||
"You should consider upgrading via the '/home/ubuntu/py3_6/bin/python3.6 -m pip install --upgrade pip' command.\u001b[0m\n"
|
||||
"\u001B[33mWARNING: You are using pip version 20.1.1; however, version 20.2.2 is available.\n",
|
||||
"You should consider upgrading via the '/home/ubuntu/py3_6/bin/python3.6 -m pip install --upgrade pip' command.\u001B[0m\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@ -281,7 +281,7 @@
|
||||
"\n",
|
||||
"# Install the latest master of Haystack and install the version of torch that works with the colab GPUs\n",
|
||||
"!pip install git+https://github.com/deepset-ai/haystack.git\n",
|
||||
"!pip install torch==1.5.1+cu101 torchvision==0.6.1+cu101 -f https://download.pytorch.org/whl/torch_stable.html"
|
||||
"!pip install torch==1.6.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -3007,4 +3007,4 @@
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 1
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user