Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support python 3.12 #619

Merged
merged 11 commits into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
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
19 changes: 17 additions & 2 deletions .make.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ __check_defined = \
@version=$$(echo $(PYTHON_VERSION) | sed -e 's/Python[ ]*//'); \
major=$$(echo $$version | awk -F. '{print $$1}'); \
minor=$$(echo $$version | awk -F. '{print $$2}'); \
if [ $$major -lt 3 -o $$minor -lt 10 -o $$minor -gt 11 ]; then \
echo Python 3.10 or 3.11 is required, but got $$version; \
if [ $$major -lt 3 -o $$minor -lt 10 -o $$minor -gt 12 ]; then \
echo Python 3.10 - 3.12 is required, but got $$version; \
echo Try overriding PYTHON=$(PYTHON). For example, "'"make PYTHON=python3.10" ...'"; \
exit 1; \
fi
Expand Down Expand Up @@ -553,12 +553,15 @@ MINIO_ADMIN_PWD= localminiosecretkey
# Changes the version field of the pyproject.toml file to the given version
# and update the referenced library versions as defined in .make.versions.
# Expects TOML_VERSION


.PHONY: .defaults.update-toml
.defaults.update-toml:
$(call check_defined, TOML_VERSION)
if [ -e pyproject.toml ]; then \
$(MAKE) TOML_VERSION=$(TOML_VERSION) .defaults.__set-toml-version; \
$(MAKE) .defaults.__update-toml-lib-dep-versions; \
$(MAKE) .defaults.__update-toml-python-versions; \
fi

# Changes the version field of the pyproject.toml file to the given version
Expand All @@ -573,6 +576,18 @@ MINIO_ADMIN_PWD= localminiosecretkey
mv tt.toml pyproject.toml; \
fi

# Updates the Python supported versions field of the pyproject.toml file to the given versions
# Expects REQUIRED_PYTHON_VERSIONS
.PHONY: .defaults.__update-toml-python-versions
.defaults.__update-toml-python-versions:
@# Help: Set the version= field of pyproject.toml
if [ -e pyproject.toml ]; then \
cat pyproject.toml | sed -e \
's/^requires-python[ ]*=.*"/requires-python = "'${REQUIRED_PYTHON_VERSIONS}'"/' \
daw3rd marked this conversation as resolved.
Show resolved Hide resolved
> tt.toml; \
mv tt.toml pyproject.toml; \
fi

# Updates the versions references to our repo source as defined in .make.versions
.PHONY: .defaults.__update-toml-lib-dep-versions
.defaults.__update-toml-lib-dep-versions:
Expand Down
4 changes: 3 additions & 1 deletion .make.versions
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,11 @@ KFP_v2=2.2.0
KFP_v2_SDK=2.8.0
KFP_v1=1.8.5
KFP_v1_SDK=1.8.22
RAY=2.24.0
RAY=2.36.1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@roytman just to confirm: Ray 2.36.1 will work with Python 3.10, 3.11 and 3.12. right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran all CI/CD tests with Python 3.12 and now it runs with Python 3.10. So yes, it works.

SPARK_VERSION=3.5.2

REQUIRED_PYTHON_VERSIONS=">=3.10,<3.13"

ifeq ($(KFPv2), 1)
WORKFLOW_SUPPORT_LIB=kfp_v2_workflow_support
else
Expand Down
2 changes: 1 addition & 1 deletion data-processing-lib/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "data_prep_toolkit"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
keywords = ["data", "data preprocessing", "data preparation", "llm", "generative", "ai", "fine-tuning", "llmapps" ]
description = "Data Preparation Toolkit Library"
license = {text = "Apache-2.0"}
Expand Down
3 changes: 3 additions & 0 deletions data-processing-lib/ray/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ setup::

set-versions: .check-env
$(MAKE) TOML_VERSION=$(DPK_LIB_VERSION) .defaults.update-toml
cat pyproject.toml | sed -e 's/"ray[default]==.*",/"ray[default]==$(RAY)",/' > tt.toml
daw3rd marked this conversation as resolved.
Show resolved Hide resolved
mv tt.toml pyproject.toml


build:: build-dist

Expand Down
4 changes: 2 additions & 2 deletions data-processing-lib/ray/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "data_prep_toolkit_ray"
version = "0.2.2.dev0"
keywords = ["data", "data preprocessing", "data preparation", "llm", "generative", "ai", "fine-tuning", "llmapps" ]
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "Data Preparation Toolkit Library for Ray"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand All @@ -12,7 +12,7 @@ authors = [
]
dependencies = [
"data-prep-toolkit>=0.2.2.dev0",
"ray[default]==2.24.0",
"ray[default]==2.36.1",
roytman marked this conversation as resolved.
Show resolved Hide resolved
# These two are to fix security issues identified by quay.io
"fastapi>=0.110.2",
"pillow>=10.3.0",
Expand Down
2 changes: 1 addition & 1 deletion data-processing-lib/spark/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "data_prep_toolkit_spark"
version = "0.2.2.dev0"
keywords = ["data", "data preprocessing", "data preparation", "llm", "generative", "ai", "fine-tuning", "llmapps" ]
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "Data Preparation Toolkit Library for Spark"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion kfp/kfp_ray_components/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=docker.io/rayproject/ray:2.24.0-py310
ARG BASE_IMAGE=docker.io/rayproject/ray:2.36.1-py312

FROM ${BASE_IMAGE}

Expand Down
2 changes: 1 addition & 1 deletion kfp/kfp_support_lib/kfp_v1_workflow_support/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "data_prep_toolkit_kfp_v1"
version = "0.2.2.dev0"
requires-python = ">=3.10,<3.12"
requires-python = ">=3.10,<3.13"
description = "Data Preparation Kit Library. KFP support"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion kfp/kfp_support_lib/kfp_v2_workflow_support/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "data_prep_toolkit_kfp_v2"
version = "0.2.2.dev0"
requires-python = ">=3.10,<3.12"
requires-python = ">=3.10,<3.13"
description = "Data Preparation Kit Library. KFP support"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion kfp/kfp_support_lib/shared_workflow_support/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "data_prep_toolkit_kfp_shared"
version = "0.2.2.dev0"
requires-python = ">=3.10,<3.12"
requires-python = ">=3.10,<3.13"
description = "Data Preparation Kit Library. KFP support"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/code/code2parquet/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_code2parquet_transform_python"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "code2parquet Python Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/code/code2parquet/ray/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_code2parquet_transform_ray"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "code2parquet Ray Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/code/code_quality/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_code_quality_transform_python"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "Code Quality Python Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/code/code_quality/ray/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_code_quality_transform_ray"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "Code Quality Ray Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/code/header_cleanser/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_header_cleanser_transform_python"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "License and Copyright Removal Transform for Python"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/code/header_cleanser/ray/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_header_cleanser_transform_ray"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "License and copyright removal Transform for Ray"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/code/malware/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_malware_transform_python"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "Malware Python Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/code/malware/ray/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_malware_transform_ray"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "Malware Ray Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/code/proglang_select/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_proglang_select_transform_python"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "Programming Language Selection Python Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/code/proglang_select/ray/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_proglang_select_transform_ray"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "Programming Language Selection Ray Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/code/repo_level_ordering/ray/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_repo_level_order_transform_ray"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "repo_level_order Ray Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/language/doc_chunk/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_doc_chunk_transform_python"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "chunk documents Python Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/language/doc_chunk/ray/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_doc_chunk_transform_ray"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "chunk documents Ray Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/language/doc_quality/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_doc_quality_transform_python"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "Document Quality Python Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/language/doc_quality/ray/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_doc_quality_transform_ray"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "Document Quality Ray Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/language/html2parquet/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_html2parquet_transform_python"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "HTML2PARQUET Python Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/language/lang_id/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_lang_id_transform_python"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "Language Identification Python Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/language/lang_id/ray/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_lang_id_transform_ray"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "Language Identification Ray Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/language/pdf2parquet/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_pdf2parquet_transform_python"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "PDF2PARQUET Python Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/language/pdf2parquet/ray/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_pdf2parquet_transform_ray"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "PDF2PARQUET Ray Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/language/pii_redactor/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_pii_redactor_transform_python"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "PII redactor Transform for Python"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/language/pii_redactor/ray/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_pii_redactor_transform_ray"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "PII Redactor Ray Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/language/text_encoder/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_text_encoder_transform_python"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "Text Encoder Python Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/language/text_encoder/ray/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_text_encoder_transform_ray"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "Text Encoder Ray Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/packaging/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "data_prep_toolkit_transforms"
version = "0.2.2.dev0"
requires-python = ">=3.10,<3.12"
requires-python = ">=3.10,<3.13"
keywords = ["transforms", "data preprocessing", "data preparation", "llm", "generative", "ai", "fine-tuning", "llmapps" ]
description = "Data Preparation Toolkit Transforms"
license = {text = "Apache-2.0"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/packaging/ray/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "data_prep_toolkit_transforms_ray"
version = "0.2.2.dev0"
requires-python = ">=3.10,<3.12"
requires-python = ">=3.10,<3.13"
keywords = ["transforms", "data preprocessing", "data preparation", "llm", "generative", "ai", "fine-tuning", "llmapps" ]
description = "Data Preparation Toolkit Transforms using Ray"
license = {text = "Apache-2.0"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/universal/doc_id/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_doc_id_transform_python"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "ededup Python Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/universal/doc_id/ray/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_doc_id_transform_ray"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "docid Ray Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
2 changes: 1 addition & 1 deletion transforms/universal/doc_id/spark/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dpk_doc_id_transform_spark"
version = "0.2.2.dev0"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
description = "Doc ID Spark Transform"
license = {text = "Apache-2.0"}
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
Loading
Loading