Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
cd43ee1
fix: remove deprecated package from setup.py, run pip install in Dock…
Apr 14, 2025
0dc1e7c
feat: support python 3.9 - 3.13 in setup.py
Apr 14, 2025
494338e
chore: adjust workflow for testing
Apr 14, 2025
108c01c
feat: adjust python-version used in all workflows
Apr 14, 2025
a6a2008
chore: bump caraml-auth-google to pre release version
Apr 14, 2025
938e7e1
feat: install setuptools and stuff from CI
Apr 14, 2025
54b115b
chore: add Cython to requirements
Apr 15, 2025
9789182
chore: move Cython installation before building setup.py
Apr 15, 2025
d657a20
chore: try to use python -m pip instead of pip directly
Apr 15, 2025
d5be94c
feat: add cython to Pipfile
Apr 15, 2025
3591097
feat: adjust TESTS_REQUIRE version
Apr 15, 2025
43293e1
chore: try other versions of the dependencies
Apr 15, 2025
040ba72
feat: adjust batch-predictor dependency to support python 3.11
Apr 15, 2025
df55678
chore: bump dependency version to support python 3.13
Apr 15, 2025
bcfad36
feat: pindown sdk dependency version to support python 3.13.*
Apr 15, 2025
05b7312
feat: use importlib instead of imp
Apr 15, 2025
23eb661
feat: bump pyarrow version to version which work with python 3.9 - 3.13
Apr 15, 2025
2b70ae3
chore: revert unnecessary changes
Apr 15, 2025
6449bb0
feat: use importlib instead of imp
Apr 15, 2025
8850153
feat: bump confluent-kafka to version which work with python 3.9 - 3.13
Apr 15, 2025
ddb2371
chore: revert pydantic version
Apr 15, 2025
6a0b6cc
feat: only runs workflow for python 3.9 - 3.12
Apr 15, 2025
72439f8
chore: downgrade protobuf version to work with arize
Apr 16, 2025
41cc786
chore: downgrade grpcio-tools
Apr 16, 2025
9890e7c
chore: adjust numpy version
Apr 16, 2025
2c590f5
chore: adjust caraml-auth-google version for observation-publisher
Apr 16, 2025
b1518e4
chore: adjust grpcio version
Apr 16, 2025
be8a3e8
chore: try to deprecate urllib3-mock and use responses instead
Apr 16, 2025
2311cae
chore: fix invalid syntax and remove unnecessary changes
Apr 16, 2025
65502d5
chore: use PIPENV_VENV_IN_PROJECT
Apr 16, 2025
2a3034b
feat: use mock_responses instead of responses
Apr 16, 2025
e9577a9
feat: use PIPENV_VENV_IN_PROJECT: true in test-pyfunc-server
Apr 16, 2025
20cf317
feat: use mock_responses in model_test.py
Apr 16, 2025
35091dd
feat: use mock_responses in conftest.py
Apr 16, 2025
d21c0b4
chore: add mock_response in param
Apr 16, 2025
3167710
chore: adjust url in mock_responses.add()
Apr 16, 2025
b834426
chore: revert all changes related to unittest
Apr 16, 2025
894a3fd
chore: try to add python 3.13 to matrix
Apr 17, 2025
3b618e7
chore: install rust to allow building pydantic-core wheel manually fr…
Apr 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/merlin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,19 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
env:
PIPENV_DEFAULT_PYTHON_VERSION: ${{ matrix.python-version }}
PIPENV_VENV_IN_PROJECT: true
steps:
- uses: actions/checkout@v4
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v4
with:
path: ~/.cache/pip
Expand All @@ -77,9 +80,10 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
env:
PIPENV_DEFAULT_PYTHON_VERSION: ${{ matrix.python-version }}
PIPENV_VENV_IN_PROJECT: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down Expand Up @@ -109,7 +113,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
env:
PIPENV_DEFAULT_PYTHON_VERSION: ${{ matrix.python-version }}
steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
required: true
pypi_password:
required: true
workflow_dispatch:

env:
DOCKER_REGISTRY: ghcr.io
Expand Down Expand Up @@ -101,7 +102,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
needs:
- publish-python-sdk
steps:
Expand Down
1 change: 1 addition & 0 deletions python/batch-predictor/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ verify_ssl = true
merlin-batch-predictor = {editable = true,extras = ["test"],path = "."}

[packages]
cython = ">=3.0"
merlin-batch-predictor = {extras = ["test"], file = ".", editable = true}
2 changes: 1 addition & 1 deletion python/batch-predictor/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ cloudpickle==2.0.0
findspark==2.0.1
merlin-sdk==0.0.0
mlflow==1.26.1
pyarrow>=0.14.1,<=17.0.0
pyarrow==19.0.0
pyspark==3.1.3
setuptools<75
6 changes: 3 additions & 3 deletions python/batch-predictor/requirements_test.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pytest
pytest>=8.1
pytest-cov
mypy
google-cloud-bigquery
scikit-learn>=1.1.2
joblib>=0.13.0,<1.2.0 # >=1.2.0 upon upgrade of kserve's version
scikit-learn>=1.3.1
joblib>=1.2.0
mypy-protobuf>=1.19
types-PyYAML
16 changes: 11 additions & 5 deletions python/batch-predictor/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import imp
import importlib.util
import os

from setuptools import find_packages, setup

version = imp.load_source(
"merlinpyspark.version", os.path.join("merlinpyspark", "version.py")
).VERSION
# get version from version.py
spec = importlib.util.spec_from_file_location(
"merlinpyspark.version", os.path.join("merlinpyspark","version.py")
)

v_module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(v_module)

version = v_module.VERSION

with open("requirements.txt") as f:
REQUIRE = f.read().splitlines()
Expand All @@ -34,7 +40,7 @@
description="Base PySpark application for running Merlin prediction batch job",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
python_requires=">=3.8,<3.11",
python_requires=">=3.9,<3.14",
packages=find_packages(exclude=["test"]),
install_requires=REQUIRE,
tests_require=TESTS_REQUIRE,
Expand Down
4 changes: 2 additions & 2 deletions python/observation-publisher/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ botocore==1.35.39
# s3transfer
cachetools==5.3.2
# via google-auth
caraml-auth-google==0.0.0.post7
caraml-auth-google==0.0.0.post16.dev0
# via merlin-sdk
caraml-upi-protos==1.0.0
# via
Expand Down Expand Up @@ -150,7 +150,7 @@ mlflow==1.26.1
# via merlin-sdk
mypy-extensions==1.0.0
# via typing-inspect
numpy==1.23.5
numpy>=1.26.4,<2.0
# via
# merlin-sdk
# mlflow
Expand Down
1 change: 1 addition & 0 deletions python/pyfunc-server/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ verify_ssl = true

[packages]
pyfuncserver = {editable = true, extras = ["test"], path = "."}
cython = ">=3.0"
merlin-pyfunc-server = {extras = ["test"], file = ".", editable = true}

[dev-packages]
2 changes: 1 addition & 1 deletion python/pyfunc-server/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
argparse>=1.4.0
caraml-upi-protos>=0.3.4
cloudpickle==2.0.0
confluent-kafka==2.3.0
confluent-kafka>=2.6.0
grpcio-health-checking
grpcio-reflection
merlin-sdk==0.0.0
Expand Down
30 changes: 18 additions & 12 deletions python/pyfunc-server/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,35 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import imp
import importlib.util
import os

from setuptools import find_packages, setup

version = imp.load_source(
"pyfuncserver.version", os.path.join("pyfuncserver", "version.py")
).VERSION
# get version from version.py
spec = importlib.util.spec_from_file_location(
"pyfuncserver.version", os.path.join("pyfuncserver","version.py")
)

v_module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(v_module)

version = v_module.VERSION

with open("requirements.txt") as f:
REQUIRE = f.read().splitlines()

TESTS_REQUIRE = [
"joblib>=0.13.0,<1.2.0", # >=1.2.0 upon upgrade of kserve's version
"mypy",
"pytest-benchmark",
"joblib>=1.2.0",
"mypy>=1.5.4",
"pytest>=8.1",
"pytest-benchmark>=5.1.0",
"pytest-tornasync",
"pytest",
"requests",
"scikit-learn>=1.1.2",
"requests>=2.31.0",
"scikit-learn>=1.3.1",
"types-protobuf",
"types-requests",
"xgboost==1.6.2",
"xgboost>=1.7.6",
]

setup(
Expand All @@ -44,7 +50,7 @@
description="Model Server implementation for Merlin PyFunc model",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
python_requires=">=3.8,<3.11",
python_requires=">=3.8,<3.14",
packages=find_packages(exclude=["test"]),
install_requires=REQUIRE,
tests_require=TESTS_REQUIRE,
Expand Down
10 changes: 6 additions & 4 deletions python/sdk/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ dataclasses-json>=0.5.2 # allow Flyte version 1.2.0 or above to import Merlin S
docker<=6.1.3
GitPython>=3.1.40
google-cloud-storage>=1.19.0
protobuf>=3.12.0,<5.0.0 # Determined by the mlflow dependency
protobuf>=4.21.6,<5
mlflow==1.26.1
PyPrind>=2.11.2
python_dateutil>=2.5.3
PyYAML>=5.4
six>=1.10
urllib3>=1.26
numpy<=1.23.5 # Temporary pin numpy due to https://numpy.org/doc/stable/release/1.20.0-notes.html#numpy-1-20-0-release-notes
caraml-auth-google==0.0.0.post7
pydantic==2.5.3
numpy>=1.26.4
caraml-auth-google==0.0.0.post16.dev0
pydantic==2.5.3
grpcio-tools>=1.50.0,<1.63
grpcio>=1.60.1
4 changes: 2 additions & 2 deletions python/sdk/requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ types-python-dateutil
types-PyYAML
types-six
types-protobuf
urllib3-mock>=0.3.3
xarray
xgboost==1.6.2
xgboost==1.6.2
urllib3-mock>=0.3.3
16 changes: 11 additions & 5 deletions python/sdk/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import imp
import importlib.util
import os

from setuptools import find_packages, setup

version = imp.load_source(
"merlin.version", os.path.join("merlin", "version.py")
).VERSION
# get version from version.py
spec = importlib.util.spec_from_file_location(
"sdk.version", os.path.join("merlin/version.py")
)

v_module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(v_module)

version = v_module.VERSION

with open("requirements.txt") as f:
REQUIRE = f.read().splitlines()
Expand All @@ -41,7 +47,7 @@
setup_requires=["setuptools_scm"],
tests_require=TESTS_REQUIRE,
extras_require={"test": TESTS_REQUIRE},
python_requires=">=3.8,<3.11",
python_requires=">=3.9,<3.14",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
entry_points="""
Expand Down
2 changes: 1 addition & 1 deletion python/sdk/test/client_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,4 +427,4 @@ def test_get_default_environment(mock_url, api_client, mock_oauth, use_google_oa
)
env = client.get_default_environment()

assert env is None
assert env is None
2 changes: 1 addition & 1 deletion python/sdk/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,4 @@ def mock_oauth():
""",
status=200,
content_type="application/json",
)
)
2 changes: 1 addition & 1 deletion python/sdk/test/merlin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,4 @@ def _mock_list_environment_call():
body=json.dumps([env_1.to_dict(), env_2.to_dict()]),
status=200,
content_type="application/json",
)
)
2 changes: 1 addition & 1 deletion python/sdk/test/model_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1847,4 +1847,4 @@ def test_model_deletion(self, model):
)
response = model.delete_model()

assert response == 1
assert response == 1
Loading