mirror of
https://github.com/bentoml/BentoML.git
synced 2026-10-12 02:11:27 +00:00
feat: drop python 3.8 for the coming EOL (#4948)
This commit is contained in:
@@ -28,7 +28,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
python-version: [3.8, 3.11, 3.12]
|
||||
python-version: [3.9, 3.11, 3.12]
|
||||
name: unit-tests (python${{ matrix.python-version }}.${{ matrix.os }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
@@ -86,14 +86,14 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.8'
|
||||
python-version: '3.9'
|
||||
cache: pip
|
||||
- name: Install dependencies
|
||||
run: pipx install pdm && pipx install nox
|
||||
- name: Run framework integration tests
|
||||
run: nox --session "framework-integration(framework='${{ matrix.framework }}')"
|
||||
- name: Disambiguate coverage filename
|
||||
run: mv .coverage ".coverage.integrations.ubuntu-latest.3.8.${{ matrix.framework }}"
|
||||
run: mv .coverage ".coverage.integrations.ubuntu-latest.3.9.${{ matrix.framework }}"
|
||||
- name: Upload coverage data
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
@@ -104,7 +104,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
python-version: [3.8, 3.11, 3.12]
|
||||
python-version: [3.9, 3.11, 3.12]
|
||||
name: monitoring-e2e-tests (python${{ matrix.python-version }}.${{ matrix.os }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 90
|
||||
@@ -142,7 +142,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
python-version: [3.8, 3.11, 3.12]
|
||||
python-version: [3.9, 3.11, 3.12]
|
||||
suite: ['bento_server_http', 'bento_new_sdk']
|
||||
exclude:
|
||||
- os: macos-latest
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.9
|
||||
3.11
|
||||
|
||||
+5
-5
@@ -12,7 +12,7 @@ If you are interested in proposing a new feature, make sure to create a new feat
|
||||
|
||||
1. Make sure to have [Git](https://git-scm.com/),
|
||||
[pip](https://pip.pypa.io/en/stable/installation/),
|
||||
[Python3.8+](https://www.python.org/downloads/), and
|
||||
[Python3.9+](https://www.python.org/downloads/), and
|
||||
[PDM](https://pdm.fming.dev/latest/) installed.
|
||||
|
||||
Optionally, make sure to have [GNU Make](https://www.gnu.org/software/make/)
|
||||
@@ -75,7 +75,7 @@ If you are interested in proposing a new feature, make sure to create a new feat
|
||||
|
||||
1. Confirm that you have the following installed:
|
||||
|
||||
- [Python3.8+](https://www.python.org/downloads/)
|
||||
- [Python3.9+](https://www.python.org/downloads/)
|
||||
- VS Code with the [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python) and [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance) extensions
|
||||
|
||||
2. Fork the BentoML project on [GitHub](https://github.com/bentoml/BentoML).
|
||||
@@ -264,10 +264,10 @@ pip install git+https://github.com/{YOUR_GITHUB_USERNAME}/bentoml@{YOUR_REVISION
|
||||
And in your BentoML projects' `bentofile.yaml`, force the Bento to install this distribution, e.g.:
|
||||
|
||||
```yaml
|
||||
service: "service:svc"
|
||||
description: "file: ./README.md"
|
||||
service: 'service:svc'
|
||||
description: 'file: ./README.md'
|
||||
include:
|
||||
- "*.py"
|
||||
- '*.py'
|
||||
python:
|
||||
packages:
|
||||
- pandas
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
🍱 Build model inference APIs and multi-model serving systems with any open-source or custom AI models. 👉 [Join our Slack community!](https://l.bentoml.com/join-slack)
|
||||
|
||||
|
||||
[](https://github.com/bentoml/BentoML?tab=Apache-2.0-1-ov-file)
|
||||
[](https://github.com/bentoml/bentoml/releases)
|
||||
[](https://github.com/bentoml/BentoML/actions/workflows/ci.yml?query=branch%3Amain)
|
||||
@@ -25,13 +24,12 @@ BentoML is a Python library for building online serving systems optimized for AI
|
||||
- **👩💻 Fully customizable.** Easily implement your own APIs or task queues, with custom business logic, model inference and multi-model composition. Supports any ML framework, modality, and inference runtime.
|
||||
- **🚀 Ready for Production.** Develop, run and debug locally. Seamlessly deploy to production with Docker containers or [BentoCloud](https://www.bentoml.com/).
|
||||
|
||||
|
||||
## Getting started
|
||||
|
||||
Install BentoML:
|
||||
|
||||
```
|
||||
# Requires Python≥3.8
|
||||
# Requires Python≥3.9
|
||||
pip install -U bentoml
|
||||
```
|
||||
|
||||
@@ -82,13 +80,13 @@ with bentoml.SyncHTTPClient('http://localhost:3000') as client:
|
||||
To deploy your BentoML Service code, first create a `bentofile.yaml` file to define its dependencies and environments. Find the full list of bentofile options [here](https://docs.bentoml.com/en/latest/guides/build-options.html).
|
||||
|
||||
```yaml
|
||||
service: "service:Summarization" # Entry service import path
|
||||
service: 'service:Summarization' # Entry service import path
|
||||
include:
|
||||
- "*.py" # Include all .py files in current directory
|
||||
- '*.py' # Include all .py files in current directory
|
||||
python:
|
||||
packages: # Python dependencies to include
|
||||
- torch
|
||||
- transformers
|
||||
- torch
|
||||
- transformers
|
||||
docker:
|
||||
python_version: 3.11
|
||||
```
|
||||
|
||||
@@ -7,7 +7,7 @@ BentoML is distributed as a Python package available on `PyPI <https://pypi.org/
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
- Python 3.8+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- Python 3.9+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- (Optional) We recommend you create a virtual environment for dependency isolation. See the `Conda documentation <https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html>`_ or the `Python documentation <https://docs.python.org/3/library/venv.html>`_ for details.
|
||||
- (Optional) `Git <https://git-scm.com/>`_ installed for `editable install <https://docs.bentoml.com/en/latest/quickstarts/install-bentoml.html#editable-install>`_.
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ You can find all the project files in the `quickstart <https://github.com/bentom
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
- Python 3.8+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- Python 3.9+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- (Optional) We recommend you create a virtual environment for dependency isolation. See the `Conda documentation <https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html>`_ or the `Python documentation <https://docs.python.org/3/library/venv.html>`_ for details.
|
||||
|
||||
Install dependencies
|
||||
|
||||
@@ -398,7 +398,7 @@ The following ``docker`` field contains some basic Docker configurations:
|
||||
|
||||
docker:
|
||||
distro: debian
|
||||
python_version: "3.8.12"
|
||||
python_version: "3.11"
|
||||
cuda_version: "11.6.2"
|
||||
system_packages:
|
||||
- libblas-dev
|
||||
|
||||
@@ -11,7 +11,7 @@ All the source code in this tutorial is available in the `BentoWhisperX GitHub r
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
- Python 3.8+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- Python 3.9+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- You have a basic understanding of key concepts in BentoML, such as Services. We recommend you read :doc:`/get-started/quickstart` first.
|
||||
- If you want to test this project locally, install FFmpeg on your system.
|
||||
- Gain access to the model used in this project: `pyannote/segmentation-3.0 <https://huggingface.co/pyannote/segmentation-3.0>`_.
|
||||
|
||||
@@ -9,7 +9,7 @@ This document explains how to serve and deploy an MLflow model with BentoML. You
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
- Python 3.8+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- Python 3.9+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- You have a basic understanding of key concepts in BentoML, such as Services. We recommend you read :doc:`/get-started/quickstart` first.
|
||||
- (Optional) We recommend you create a virtual environment for dependency isolation. See the `Conda documentation <https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html>`_ or the `Python documentation <https://docs.python.org/3/library/venv.html>`_ for details.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ This document explains how to serve and deploy an XGBoost model for predicting b
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
- Python 3.8+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- Python 3.9+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- You have a basic understanding of key concepts in BentoML, such as Services. We recommend you read :doc:`/get-started/quickstart` first.
|
||||
- (Optional) We recommend you create a virtual environment for dependency isolation. See the `Conda documentation <https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html>`_ or the `Python documentation <https://docs.python.org/3/library/venv.html>`_ for details.
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ All the source code in this tutorial is available in the `BentoDiffusion GitHub
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
- Python 3.8+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- Python 3.9+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- You have a basic understanding of key concepts in BentoML, such as Services. We recommend you read :doc:`/get-started/quickstart` first.
|
||||
- To run this BentoML Service locally, you need a Nvidia GPU with at least 12G VRAM.
|
||||
- (Optional) We recommend you create a virtual environment for dependency isolation. See the `Conda documentation <https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html>`_ or the `Python documentation <https://docs.python.org/3/library/venv.html>`_ for details.
|
||||
|
||||
@@ -11,7 +11,7 @@ All the source code in this tutorial is available in the `BentoDiffusion GitHub
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
- Python 3.8+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- Python 3.9+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- You have a basic understanding of key concepts in BentoML, such as Services. We recommend you read :doc:`/get-started/quickstart` first.
|
||||
- To run this BentoML Service locally, you need a Nvidia GPU with at least 12G VRAM.
|
||||
- (Optional) We recommend you create a virtual environment for dependency isolation. See the `Conda documentation <https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html>`_ or the `Python documentation <https://docs.python.org/3/library/venv.html>`_ for details.
|
||||
|
||||
@@ -11,7 +11,7 @@ All the source code in this tutorial is available in the `BentoClip GitHub repos
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
- Python 3.8+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- Python 3.9+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- You have a basic understanding of key concepts in BentoML, such as Services. We recommend you read :doc:`/get-started/quickstart` first.
|
||||
- (Optional) We recommend you create a virtual environment for dependency isolation. See the `Conda documentation <https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html>`_ or the `Python documentation <https://docs.python.org/3/library/venv.html>`_ for details.
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ All the source code in this tutorial is available in the `BentoSentenceTransform
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
- Python 3.8+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- Python 3.9+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- You have a basic understanding of key concepts in BentoML, such as Services. We recommend you read :doc:`/get-started/quickstart` first.
|
||||
- (Optional) We recommend you create a virtual environment for dependency isolation. See the `Conda documentation <https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html>`_ or the `Python documentation <https://docs.python.org/3/library/venv.html>`_ for details.
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ All the source code in this tutorial is available in the `BentoVLLM GitHub repos
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
- Python 3.8+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- Python 3.9+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- You have a basic understanding of key concepts in BentoML, such as Services. We recommend you read :doc:`/get-started/quickstart` first.
|
||||
- If you want to test the project locally, you need a Nvidia GPU with least 16G VRAM.
|
||||
- (Optional) We recommend you create a virtual environment for dependency isolation. See the `Conda documentation <https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html>`_ or the `Python documentation <https://docs.python.org/3/library/venv.html>`_ for details.
|
||||
|
||||
@@ -9,7 +9,7 @@ All the source code in this tutorial is available in the `BentoBlip GitHub repos
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
- Python 3.8+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- Python 3.9+ and ``pip`` installed. See the `Python downloads page <https://www.python.org/downloads/>`_ to learn more.
|
||||
- You have a basic understanding of key concepts in BentoML, such as Services. We recommend you read :doc:`/get-started/quickstart` first.
|
||||
- (Optional) We recommend you create a virtual environment for dependency isolation. See the `Conda documentation <https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html>`_ or the `Python documentation <https://docs.python.org/3/library/venv.html>`_ for details.
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ This quickstart demonstrates how to build a text summarization application with
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Python 3.8+ and `pip` installed. See the [Python downloads page](https://www.python.org/downloads/) to learn more.
|
||||
Python 3.9+ and `pip` installed. See the [Python downloads page](https://www.python.org/downloads/) to learn more.
|
||||
|
||||
## Get started
|
||||
|
||||
|
||||
+4
-5
@@ -12,16 +12,15 @@ TEST_ARGS = [
|
||||
"-vv",
|
||||
]
|
||||
|
||||
PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
||||
PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12"]
|
||||
|
||||
FRAMEWORK_DEPENDENCIES = {
|
||||
"catboost": ["catboost"],
|
||||
"catboost": ["catboost", "numpy<2"],
|
||||
"diffusers": ["diffusers", "transformers", "tokenizer"],
|
||||
"easyocr": ["easyocr"],
|
||||
"fastai": ["fastai"],
|
||||
"flax": [
|
||||
"tensorflow~=2.13.1",
|
||||
"pydantic<2",
|
||||
"tensorflow",
|
||||
"flax; platform_system!='Windows'",
|
||||
"jax[cpu]; platform_system!='Windows'",
|
||||
"jaxlib; platform_system!='Windows'",
|
||||
@@ -34,7 +33,7 @@ FRAMEWORK_DEPENDENCIES = {
|
||||
"pytorch": [],
|
||||
"pytorch_lightning": ["lightning"],
|
||||
"sklearn": ["scikit-learn"],
|
||||
"tensorflow": ["tensorflow~=2.13.1", "pydantic<2"],
|
||||
"tensorflow": ["tensorflow"],
|
||||
"torchscript": [],
|
||||
"xgboost": ["xgboost"],
|
||||
"detectron": ["detectron2"],
|
||||
|
||||
+1
-3
@@ -2,7 +2,7 @@
|
||||
name = "bentoml"
|
||||
description = "BentoML: The easiest way to serve AI apps and models"
|
||||
readme = { file = "README.md", content-type = "text/markdown" }
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
keywords = ["BentoML", "Compound AI Systems", "MLOps", "LLMOps", "Model Serving", "Model Inference", "Model Deployment"]
|
||||
license = { text = "Apache-2.0" }
|
||||
authors = [{ name = "BentoML Team", email = "[email protected]" }]
|
||||
@@ -14,7 +14,6 @@ classifiers = [
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3 :: Only",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
@@ -71,7 +70,6 @@ dependencies = [
|
||||
"aiosqlite>=0.20.0",
|
||||
"InquirerPy>=0.3.4",
|
||||
"uv",
|
||||
"eval-type-backport>=0.2.0; python_version < \"3.9\"",
|
||||
]
|
||||
dynamic = ["version"]
|
||||
[project.urls]
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import typing as t
|
||||
|
||||
from tensorflow import Tensor
|
||||
from tensorflow.python.client.session import Session
|
||||
from tensorflow.python.eager.def_function import Function
|
||||
from tensorflow.python.eager.function_spec import FunctionSpec
|
||||
from tensorflow.python.framework.composite_tensor import CompositeTensor
|
||||
from tensorflow.python.framework.indexed_slices import IndexedSlices
|
||||
from tensorflow.python.framework.ops import Tensor
|
||||
from tensorflow.python.framework.sparse_tensor import SparseTensorSpec
|
||||
from tensorflow.python.framework.tensor_spec import TensorSpec
|
||||
from tensorflow.python.framework.type_spec import TypeSpec
|
||||
|
||||
@@ -411,7 +411,7 @@ class TensorflowTensorContainer(
|
||||
# NOTE: we only register the TensorflowTensorContainer as if eager execution is enabled.
|
||||
if tf.executing_eagerly():
|
||||
DataContainerRegistry.register_container(
|
||||
LazyType("tensorflow.python.framework.ops", "Tensor"),
|
||||
LazyType("tensorflow.python.framework.ops", "Tensor"),
|
||||
LazyType("tensorflow", "Tensor"),
|
||||
LazyType("tensorflow", "Tensor"),
|
||||
TensorflowTensorContainer,
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
channels:
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- python=3.8.2
|
||||
- python=3.9
|
||||
- pip
|
||||
- pip:
|
||||
- mlflow
|
||||
|
||||
@@ -242,44 +242,7 @@ native_multi_output_model2 = FrameworkTestModel(
|
||||
],
|
||||
)
|
||||
|
||||
keras_models = [
|
||||
FrameworkTestModel(
|
||||
name="tf2",
|
||||
model=model,
|
||||
save_kwargs={"signatures": {"__call__": {"batchable": True, "batch_dim": 0}}},
|
||||
configurations=[
|
||||
Config(
|
||||
test_inputs={
|
||||
"__call__": [
|
||||
Input(
|
||||
input_args=[inp],
|
||||
expected=lambda out: np.isclose(out, [[15.0]]).all(),
|
||||
),
|
||||
Input(
|
||||
input_args=[inp],
|
||||
expected=lambda out: np.isclose(out, [[15.0]]).all(),
|
||||
),
|
||||
Input(
|
||||
input_args=[inp],
|
||||
expected=lambda out: np.isclose(out, [[15.0]]).all(),
|
||||
),
|
||||
],
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
for model in [
|
||||
make_keras_functional_model(),
|
||||
make_keras_sequential_model(),
|
||||
]
|
||||
for inp in [
|
||||
input_tensor,
|
||||
input_array,
|
||||
input_data,
|
||||
]
|
||||
]
|
||||
|
||||
models: list[FrameworkTestModel] = keras_models + [
|
||||
models: list[FrameworkTestModel] = [
|
||||
native_model,
|
||||
native_multi_input_model,
|
||||
native_multi_output_model,
|
||||
|
||||
@@ -80,11 +80,11 @@ def test_register_container():
|
||||
)
|
||||
|
||||
assert (
|
||||
LazyType("tensorflow.python.framework.ops", "Tensor")
|
||||
LazyType("tensorflow", "Tensor")
|
||||
not in DataContainerRegistry.CONTAINER_BATCH_TYPE_MAP
|
||||
)
|
||||
|
||||
assert (
|
||||
LazyType("tensorflow.python.framework.ops", "Tensor")
|
||||
LazyType("tensorflow", "Tensor")
|
||||
not in DataContainerRegistry.CONTAINER_SINGLE_TYPE_MAP
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user