Skip to content

Commit

Permalink
Merge branch 'master' into feat/efficient_loading
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaarsen committed Dec 12, 2023
2 parents 033bf6d + 33915ab commit 255e828
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: Run unit tests
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']
os: [ubuntu-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The following publications are integrated in this framework:

## Installation

We recommend **Python 3.6** or higher, **[PyTorch 1.6.0](https://pytorch.org/get-started/locally/)** or higher and **[transformers v4.6.0](https://github.com/huggingface/transformers)** or higher. The code does **not** work with Python 2.7.
We recommend **Python 3.8** or higher, **[PyTorch 1.6.0](https://pytorch.org/get-started/locally/)** or higher and **[transformers v4.23.0](https://github.com/huggingface/transformers)** or higher. The code does **not** work with Python 2.7.

**Install with pip**

Expand Down
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Installation

We recommend **Python 3.6** or higher, **[PyTorch 1.6.0](https://pytorch.org/get-started/locally/)** or higher and **[transformers v4.6.0](https://github.com/huggingface/transformers)** or higher. The code does **not** work with Python 2.7.
We recommend **Python 3.8** or higher, **[PyTorch 1.6.0](https://pytorch.org/get-started/locally/)** or higher and **[transformers v4.6.0](https://github.com/huggingface/transformers)** or higher. The code does **not** work with Python 2.7.



Expand Down
2 changes: 1 addition & 1 deletion examples/applications/image-search/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SentenceTransformers provides models that allow to embed images and text into th


## Installation
Ensure that you have [torchvision](https://pypi.org/project/torchvision/) installed to use the image-text-models and use a recent PyTorch version (tested with PyTorch 1.7.0). Image-Text-Models have been added with SentenceTransformers version 1.0.0. Image-Text-Models are still in an experimental phase.
Ensure that you have [transformers](https://pypi.org/project/transformers/) installed to use the image-text-models and use a recent PyTorch version (tested with PyTorch 1.7.0). Image-Text-Models have been added with SentenceTransformers version 1.0.0. Image-Text-Models are still in an experimental phase.

## Usage
SentenceTransformers provides a wrapper for the [OpenAI CLIP Model](https://github.com/openai/CLIP), which was trained on a variety of (image, text)-pairs.
Expand Down
2 changes: 1 addition & 1 deletion index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You can install it using pip:
pip install -U sentence-transformers
We recommend **Python 3.6** or higher, and at least **PyTorch 1.6.0**. See `installation <docs/installation.html>`_ for further installation options, especially if you want to use a GPU.
We recommend **Python 3.8** or higher, and at least **PyTorch 1.6.0**. See `installation <docs/installation.html>`_ for further installation options, especially if you want to use a GPU.



Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ transformers>=4.6.0,<5.0.0
tokenizers>=0.10.3
tqdm
torch>=1.6.0
torchvision
numpy
scikit-learn
scipy
nltk
sentencepiece
huggingface-hub
Pillow
6 changes: 1 addition & 5 deletions sentence_transformers/SentenceTransformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
import stat
from collections import OrderedDict
import warnings
from typing import List, Dict, Tuple, Iterable, Type, Union, Callable, Optional
try:
from typing import Literal
except ImportError:
from typing_extensions import Literal
from typing import List, Dict, Tuple, Iterable, Type, Union, Callable, Optional, Literal
import numpy as np
from numpy import ndarray
import transformers
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@
url="https://www.SBERT.net",
download_url="https://github.com/UKPLab/sentence-transformers/",
packages=find_packages(),
python_requires=">=3.6.0",
python_requires=">=3.8.0",
install_requires=[
'transformers>=4.6.0,<5.0.0',
'tqdm',
'torch>=1.6.0',
'torchvision',
'numpy',
'scikit-learn',
'scipy',
'nltk',
'sentencepiece',
'huggingface-hub>=0.4.0'
'huggingface-hub>=0.4.0',
'Pillow'
],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.8",
"Topic :: Scientific/Engineering :: Artificial Intelligence"
],
keywords="Transformer Networks BERT XLNet sentence embedding PyTorch NLP deep learning"
Expand Down

0 comments on commit 255e828

Please sign in to comment.