Skip to content

Upgrade dependencies (now supports and defaults to Python 3.12 and Ubuntu 24.04) #1826

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

SamuelMarks
Copy link
Collaborator

@SamuelMarks SamuelMarks commented Jun 12, 2025

Description

Upgrade dependencies

  • support 3.12 trivially
  • support python3 -m pip install -r requirements.txt with no special flags

(I also sorted the dependencies so it's easier to debug and add/remove deps in the future)

FWIW Python 3.13 cannot yet be supported, but this patch did make the dependencies installable:

diff --git a/requirements.txt b/requirements.txt
index 37c759234..5592143d8 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -7,9 +7,9 @@ datasets
 flax>=0.10.6
 gcsfs
 google-api-python-client
-google-cloud-aiplatform==1.61.0
+google-cloud-aiplatform
 google-cloud-monitoring
-google-jetstream@git+https://github.com/AI-Hypercomputer/JetStream.git
+#google-jetstream@git+https://github.com/AI-Hypercomputer/JetStream.git
 grain[parquet]>=0.2.6
 huggingface_hub
 jax>=0.4.30
@@ -31,11 +31,11 @@ pyink
 pylint
 pytest
 pytype
-sentencepiece==0.2.0
+#sentencepiece==0.2.0
 tensorboard-plugin-profile
 tensorboardx>=2.6.2.2
 tensorflow-datasets
-tensorflow-text>=2.17.0
-tensorflow>=2.16.0
+#tensorflow-text>=2.17.0
+#tensorflow>=2.16.0
 tiktoken
 transformers
diff --git a/setup.py b/setup.py
index 647025ba6..61f0ff1ed 100644
--- a/setup.py
+++ b/setup.py
@@ -80,7 +80,7 @@ def main():
     long_description_content_type="text/markdown",
     classifiers=[
       "Intended Audience :: Developers",
-      "License :: OSI Approved :: Apache Software License",
+#      "License :: OSI Approved :: Apache Software License",
       "Programming Language :: Python :: 3 :: Only",
       "Programming Language :: Python :: 3.10",
       "Programming Language :: Python :: 3.11",

Tests

N/A

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed.

Copy link
Collaborator

@bvandermoon bvandermoon left a comment

Choose a reason for hiding this comment

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

Thank you @SamuelMarks. I assume we will also need to make changes in constraints_gpu.txt and requirements_with_jax_ai_image.txt?

Copy link
Collaborator

@bvandermoon bvandermoon left a comment

Choose a reason for hiding this comment

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

Is it possible to test this setup with a MaxText workload/base model?

@SamuelMarks
Copy link
Collaborator Author

@bvandermoon Sure happy to update those also. @shralex was talking about making 3.12 the new default.

How about this:

  • FROM python:3.10-slim-bullseyeFROM python:3.12-slim-bullseye
  • FROM ubuntu:22.04FROM ubuntu:24.04

(not sure the process for upgrading us-docker.pkg.dev/tpu-prod-env-multipod/jax-stable-stack the candidate/gpu:latest and candidate/tpu:latest)

Can upgrade them all in this PR or separate it out into multiple. Let me know 🤗

…ure Python 3.13 support (but remove its classifier as it isn't supported yet) ; [*] Upgrade from `3.10` to `3.12` ; upgrade from `22.04` to `24.04`
@SamuelMarks SamuelMarks changed the title [requirements.txt] Upgrade dependencies Upgrade dependencies (now supports and defaults to Python 3.12 and Ubuntu 24.04) Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants