diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bd57a42a7b..6fa43da4bd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -481,9 +481,6 @@ jobs: - name: Setup Python uses: ./.github/actions/python_cache/ - - name: Install torch-scatter - run: pip install torch-scatter -f https://data.pyg.org/whl/torch-1.12.0+cpu.html - # TODO Let's try to remove this one from the unit tests - name: Install pdftotext run: wget --no-check-certificate https://dl.xpdfreader.com/xpdf-tools-linux-4.04.tar.gz && tar -xvf xpdf-tools-linux-4.04.tar.gz && sudo cp xpdf-tools-linux-4.04/bin64/pdftotext /usr/local/bin diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base index 65500bef37..bd6a3abad2 100644 --- a/docker/Dockerfile.base +++ b/docker/Dockerfile.base @@ -5,7 +5,6 @@ FROM $build_image AS build-image ARG haystack_version ARG haystack_extras -ARG torch_scatter RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential gcc git curl \ @@ -28,7 +27,6 @@ ENV PATH="/opt/venv/bin:$PATH" RUN pip install --upgrade pip && \ pip install --no-cache-dir .${haystack_extras} && \ pip install --no-cache-dir ./rest_api && \ - pip install --no-cache-dir torch-scatter -f $torch_scatter FROM $base_immage AS final diff --git a/haystack/nodes/reader/table.py b/haystack/nodes/reader/table.py index d80f45a249..30f0053a01 100644 --- a/haystack/nodes/reader/table.py +++ b/haystack/nodes/reader/table.py @@ -28,16 +28,6 @@ from haystack.nodes.reader.base import BaseReader from haystack.modeling.utils import initialize_device_settings -torch_scatter_installed = True -torch_scatter_wrong_version = False -try: - import torch_scatter # pylint: disable=unused-import -except ImportError: - torch_scatter_installed = False -except OSError: - torch_scatter_wrong_version = True - - logger = logging.getLogger(__name__) @@ -122,15 +112,6 @@ def __init__( [torch.device('cuda:0'), "mps", "cuda:1"]). When specifying `use_gpu=False` the devices parameter is not used and a single cpu device is used for inference. """ - if not torch_scatter_installed: - raise ImportError( - "Please install torch_scatter to use TableReader. You can follow the instructions here: https://github.com/rusty1s/pytorch_scatter" - ) - if torch_scatter_wrong_version: - raise ImportError( - "torch_scatter could not be loaded. This could be caused by a mismatch between your cuda version and the one used by torch_scatter." - "Please try to reinstall torch-scatter. You can follow the instructions here: https://github.com/rusty1s/pytorch_scatter" - ) super().__init__() self.devices, _ = initialize_device_settings(devices=devices, use_cuda=use_gpu, multi_gpu=False) diff --git a/pyproject.toml b/pyproject.toml index ff970b6c75..e09c4dae22 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ dependencies = [ "torch>1.9,<1.13", "requests", "pydantic", - "transformers==4.21.2", + "transformers==4.25.1", "nltk", "pandas", "rank_bm25",