From 68e7b95d8c96518799b15166d321470b40ccbb07 Mon Sep 17 00:00:00 2001 From: Su Zhou Date: Fri, 2 May 2025 00:03:17 +0000 Subject: [PATCH 1/4] support python3.12 and remove python3.8 --- pyproject.toml | 2 +- setup.cfg | 4 +--- setup.py | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 17482c1f..9c68b754 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.black] line-length = 119 -target-version = ['py38', 'py39', 'py310', 'py311'] +target-version = ['py39', 'py310', 'py311', 'py312'] [tool.isort] known_first_party = "autogluon" diff --git a/setup.cfg b/setup.cfg index b1464d6e..7e731a65 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,9 +34,7 @@ source = [tox:tox] envlist = -; py37 - Not supported in the container - py38 -; py39 - Not supported in the container + py39 isolated_build = True [pkg-imports] diff --git a/setup.py b/setup.py index 3caa977a..77e108c5 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ AUTOGLUON = "autogluon" CLOUD = "cloud" -PYTHON_REQUIRES = ">=3.8, <3.12" +PYTHON_REQUIRES = ">=3.9, <3.13" def create_version_file(*, version): @@ -85,10 +85,10 @@ def default_setup_args(*, version): "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Software Development", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Scientific/Engineering :: Information Analysis", From c823eba60f0e2f0a88aa522a22cfb8ec757a53e6 Mon Sep 17 00:00:00 2001 From: Su Zhou Date: Fri, 2 May 2025 19:44:46 +0000 Subject: [PATCH 2/4] upgrade deps --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 77e108c5..94ac5ca8 100644 --- a/setup.py +++ b/setup.py @@ -116,10 +116,10 @@ def default_setup_args(*, version): # updated sagemaker is required to fetch latest container info, so we don't want to cap the version too strict # otherwise cloud module needs to be released to support new container "sagemaker>=2.126.0,<3.0", - "pyarrow>=11.0,<11.1", + "pyarrow>=11.0,<21", "PyYAML~=6.0", - "Pillow>=10.2,<11", # unlikely to introduce breaking changes in minor releases - "ray[default]>=2.10.0,<2.11", + "Pillow>=10.2,<12", # unlikely to introduce breaking changes in minor releases + "ray[default]>=2.10.0,<2.46", ] extras_require = dict() From 4330934383c6cee206a86e81d562cd96c04afd57 Mon Sep 17 00:00:00 2001 From: Su Zhou Date: Fri, 2 May 2025 20:12:29 +0000 Subject: [PATCH 3/4] replace distutils --- src/autogluon/cloud/utils/dlc_utils.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/autogluon/cloud/utils/dlc_utils.py b/src/autogluon/cloud/utils/dlc_utils.py index 346b6d42..8261f249 100644 --- a/src/autogluon/cloud/utils/dlc_utils.py +++ b/src/autogluon/cloud/utils/dlc_utils.py @@ -1,6 +1,5 @@ -from distutils.version import StrictVersion - from packaging import version +from packaging.version import Version from sagemaker import image_uris @@ -47,7 +46,7 @@ def retrieve_latest_framework_version(framework_type="training"): version number of latest autogluon framework, and its py_versions as a list """ versions = retrieve_available_framework_versions(framework_type) - versions.sort(key=StrictVersion) + versions.sort(key=version.parse) versions = [(v, retrieve_py_versions(v, framework_type)) for v in versions] return versions[-1] @@ -58,7 +57,7 @@ def parse_framework_version(framework_version, framework_type, py_version=None, py_version = py_versions[0] else: # Cloud supports 0.6+ containers - if minimum_version is not None and version.parse(framework_version) < version.parse(minimum_version): + if minimum_version is not None and Version(framework_version) < Version(minimum_version): raise ValueError("Cloud module only supports 0.6+ containers.") valid_options = retrieve_available_framework_versions(framework_type) assert ( From 5882e3cf1328a59e040fa6f2c64823a3bbcbc747 Mon Sep 17 00:00:00 2001 From: Su Zhou Date: Mon, 5 May 2025 17:14:39 +0000 Subject: [PATCH 4/4] update ipython --- docs/requirements_doc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements_doc.txt b/docs/requirements_doc.txt index 899eb098..28ce9a43 100644 --- a/docs/requirements_doc.txt +++ b/docs/requirements_doc.txt @@ -7,4 +7,4 @@ sphinx-design sphinx-inline-tabs sphinx-togglebutton sphinxcontrib-googleanalytics -ipython>7.16,<8.13 # IPython 8.13+ supports Python 3.9 and above; Python 3.7 is supported with IPython >7.16 +ipython>8.12 # IPython 8.13+ supports Python 3.9 and above