Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Update minimum Python version to 3.8, closes #485

davidmezzetti702eb4389ca3
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 4d0f322b..6b14e950 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -18,7 +18,7 @@ jobs:
- name: Install Python - Linux
uses: actions/setup-python@v4
with:
- python-version: 3.7
+ python-version: 3.8
if: matrix.os == 'ubuntu-latest'
- name: Install Python - macOS/Windows
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 8ac515a2..d38ad2cc 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
- python-version: 3.7
+ python-version: 3.8
- run: |
pip install -U pip wheel
pip install .[all,dev]
diff --git a/README.md b/README.md
index c085c37b..445e964f 100644
--- a/README.md
+++ b/README.md
@@ -67,7 +67,7 @@ The following applications are powered by txtai.
| [codequestion](https://github.com/neuml/codequestion) | Semantic search for developers |
| [tldrstory](https://github.com/neuml/tldrstory) | Semantic search for headlines and story text |
-txtai is built with Python 3.7+, [Hugging Face Transformers](https://github.com/huggingface/transformers), [Sentence Transformers](https://github.com/UKPLab/sentence-transformers) and [FastAPI](https://github.com/tiangolo/fastapi)
+txtai is built with Python 3.8+, [Hugging Face Transformers](https://github.com/huggingface/transformers), [Sentence Transformers](https://github.com/UKPLab/sentence-transformers) and [FastAPI](https://github.com/tiangolo/fastapi)
## Why txtai?
@@ -112,7 +112,7 @@ The easiest way to install is via pip and PyPI
pip install txtai
```
-Python 3.7+ is supported. Using a Python [virtual environment](https://docs.python.org/3/library/venv.html) is recommended.
+Python 3.8+ is supported. Using a Python [virtual environment](https://docs.python.org/3/library/venv.html) is recommended.
See the detailed [install instructions](https://neuml.github.io/txtai/install) for more information covering
[optional dependencies](https://neuml.github.io/txtai/install/#optional-dependencies), [environment specific prerequisites](https://neuml.github.io/txtai/install/#environment-specific-prerequisites), [installing from source](https://neuml.github.io/txtai/install/#install-from-source), [conda support](https://neuml.github.io/txtai/install/#conda) and how to [run with containers](https://neuml.github.io/txtai/cloud).
diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile
index 7bec6303..46be9bbd 100644
--- a/docker/base/Dockerfile
+++ b/docker/base/Dockerfile
@@ -8,7 +8,7 @@ ARG GPU
# Target CPU architecture
ARG TARGETARCH
-# Set Python version (i.e. 3, 3.7, 3.8)
+# Set Python version (i.e. 3, 3.8)
ARG PYTHON_VERSION=3
# List of txtai components to install
diff --git a/docs/cloud.md b/docs/cloud.md
index f9e9d919..a4cbefe3 100644
--- a/docs/cloud.md
+++ b/docs/cloud.md
@@ -29,8 +29,8 @@ Examples build commands below.
# Get Dockerfile
wget https://raw.githubusercontent.com/neuml/txtai/master/docker/base/Dockerfile
-# Build Ubuntu 18.04 image running Python 3.7
-docker build -t txtai --build-arg BASE_IMAGE=ubuntu:18.04 --build-arg PYTHON_VERSION=3.7 .
+# Build Ubuntu 20.04 image running Python 3.8
+docker build -t txtai --build-arg BASE_IMAGE=ubuntu:20.04 --build-arg PYTHON_VERSION=3.8 .
# Build image with GPU support
docker build -t txtai --build-arg GPU=1 .
diff --git a/docs/index.md b/docs/index.md
index 55e0931c..7f73cb5a 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -69,4 +69,4 @@ The following applications are powered by txtai.
| [codequestion](https://github.com/neuml/codequestion) | Semantic search for developers |
| [tldrstory](https://github.com/neuml/tldrstory) | Semantic search for headlines and story text |
-txtai is built with Python 3.7+, [Hugging Face Transformers](https://github.com/huggingface/transformers), [Sentence Transformers](https://github.com/UKPLab/sentence-transformers) and [FastAPI](https://github.com/tiangolo/fastapi)
+txtai is built with Python 3.8+, [Hugging Face Transformers](https://github.com/huggingface/transformers), [Sentence Transformers](https://github.com/UKPLab/sentence-transformers) and [FastAPI](https://github.com/tiangolo/fastapi)
diff --git a/docs/install.md b/docs/install.md
index fce1582c..36fdef18 100644
--- a/docs/install.md
+++ b/docs/install.md
@@ -9,7 +9,7 @@ The easiest way to install is via pip and PyPI
pip install txtai
```
-Python 3.7+ is supported. Using a Python [virtual environment](https://docs.python.org/3/library/venv.html) is recommended.
+Python 3.8+ is supported. Using a Python [virtual environment](https://docs.python.org/3/library/venv.html) is recommended.
## Optional dependencies
diff --git a/examples/01_Introducing_txtai.ipynb b/examples/01_Introducing_txtai.ipynb
index 0b98cc46..deeb39b2 100644
--- a/examples/01_Introducing_txtai.ipynb
+++ b/examples/01_Introducing_txtai.ipynb
@@ -56,7 +56,7 @@
"- [codequestion](https://github.com/neuml/codequestion) - Semantic search for developers\n",
"- [tldrstory](https://github.com/neuml/tldrstory) - Semantic search for headlines and story text\n",
"\n",
- "txtai is built with Python 3.7+, [Hugging Face Transformers](https://github.com/huggingface/transformers), [Sentence Transformers](https://github.com/UKPLab/sentence-transformers) and [FastAPI](https://github.com/tiangolo/fastapi)\n",
+ "txtai is built with Python 3.8+, [Hugging Face Transformers](https://github.com/huggingface/transformers), [Sentence Transformers](https://github.com/UKPLab/sentence-transformers) and [FastAPI](https://github.com/tiangolo/fastapi)\n",
"\n",
"This notebook gives an overview of txtai and how to run similarity searches."
]
@@ -96,7 +96,7 @@
"source": [
"# Create an Embeddings instance\n",
"\n",
- "The Embeddings instance is the main entrypoint for txtai. An Embeddings instance defines the method used to tokenize and convert a text section into an embeddings vector. "
+ "The Embeddings instance is the main entrypoint for txtai. An Embeddings instance defines the method used to tokenize and convert a text section into an embeddings vector."
]
},
{
@@ -193,9 +193,9 @@
"source": [
"# Building an Embeddings index\n",
"\n",
- "For small lists of texts, the method above works. But for larger repositories of documents, it doesn't make sense to tokenize and convert to embeddings on each query. txtai supports building pre-computed indexes which signficantly improve performance. \n",
+ "For small lists of texts, the method above works. But for larger repositories of documents, it doesn't make sense to tokenize and convert to embeddings on each query. txtai supports building pre-computed indexes which signficantly improve performance.\n",
"\n",
- "Building on the previous example, the following example runs an index method to build and store the text embeddings. In this case, only the query is converted to an embeddings vector each search. "
+ "Building on the previous example, the following example runs an index method to build and store the text embeddings. In this case, only the query is converted to an embeddings vector each search."
]
},
{
@@ -375,7 +375,7 @@
"\n",
"txtai 4.0 adds a number of new features related to storing content alongside indexes. These features open up a number of exciting possiblities with txtai!\n",
"\n",
- "The document text, additional metadata and additional objects can be stored and retrieved right alongside the indexed vectors. "
+ "The document text, additional metadata and additional objects can be stored and retrieved right alongside the indexed vectors."
],
"metadata": {
"id": "0p3WCDniUths"
@@ -415,7 +415,7 @@
"source": [
"The only change above is setting the *content* flag to True. This enables storing text and metadata content (if provided) alongside the index. Note how the text is pulled right from the query result!\n",
"\n",
- "Let's add some metadata. "
+ "Let's add some metadata."
],
"metadata": {
"id": "hHGvhZm-ZTzL"
@@ -470,7 +470,7 @@
{
"cell_type": "markdown",
"source": [
- "This example above adds a simple additional field, text length. Starting with txtai 4.0, the index method accepts dictionaries in the data field. \n",
+ "This example above adds a simple additional field, text length. Starting with txtai 4.0, the index method accepts dictionaries in the data field.\n",
"\n",
"Note the second query is filtering on the metadata field length along with a similarity query clause. This gives a great blend of similarity search with traditional filtering to help identify the best results."
],
@@ -543,7 +543,7 @@
"source": [
"# Wrapping up\n",
"\n",
- "This notebook gave a quick overview of txtai. This is just scratching the surface on what txtai can do. The following links have much more with examples on how to use embeddings, pipelines, workflows and the API to build semantic search applications. \n",
+ "This notebook gave a quick overview of txtai. This is just scratching the surface on what txtai can do. The following links have much more with examples on how to use embeddings, pipelines, workflows and the API to build semantic search applications.\n",
"\n",
"- [Documentation for txtai](https://neuml.github.io/txtai)\n",
"- [Full list of examples](https://neuml.github.io/txtai/examples/)"
diff --git a/setup.py b/setup.py
index 26b29cba..d752be80 100644
--- a/setup.py
+++ b/setup.py
@@ -92,7 +92,7 @@ setup(
packages=find_packages(where="src/python"),
package_dir={"": "src/python"},
keywords="search embedding machine-learning nlp",
- python_requires=">=3.7",
+ python_requires=">=3.8",
install_requires=install,
extras_require=extras,
classifiers=[