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

Don't gate torch behind python<3.12 #5899

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 1 addition & 2 deletions examples/python/controlnet/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ opencv-python
pillow
diffusers==0.27.2
numpy
#TODO(#4704): clean that up when pytorch is available for 3.12
torch ; python_version < "3.12"
torch
transformers
rerun-sdk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ pillow
requests>=2.31,<3
rerun-sdk
scipy
#TODO(#4704): clean that up when pytorch is available for 3.12
torch>1.13.0 ; python_version < "3.12"
torch>1.13.0
transformers>=4.26.0
3 changes: 1 addition & 2 deletions examples/python/detect_and_track_objects/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ pillow
requests>=2.31,<3
rerun-sdk
timm==0.9.11
#TODO(#4704): clean that up when pytorch is available for 3.12
torch>=1.13.0 ; python_version < "3.12"
torch>=1.13.0
transformers
3 changes: 1 addition & 2 deletions examples/python/llm_embedding_ner/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
rerun-sdk
#TODO(#4704): clean that up when pytorch is available for 3.12
torch ; python_version < "3.12"
torch
transformers
umap-learn
5 changes: 2 additions & 3 deletions examples/python/segment_anything_model/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ numpy
opencv-python
requests>=2.31,<3
rerun-sdk
#TODO(#4704): clean that up when pytorch is available for 3.12
torch ; python_version < "3.12"
torchvision ; python_version < "3.12"
torch
torchvision
tqdm
19 changes: 0 additions & 19 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@
def tests(session: nox.Session) -> None:
"""Run the Python test suite."""
session.install("-r", "rerun_py/requirements-build.txt")

# TODO(#4704): clean that up when torch is 3.12 compatible
if session.python == "3.12":
session.run(
"pip", "install", "torch", "torchvision", "--pre", "--index-url", "https://download.pytorch.org/whl/nightly"
)

session.install("./rerun_py")
session.run("just", "py-test", external=True)

Expand All @@ -32,12 +25,6 @@ def tests(session: nox.Session) -> None:
def run_all(session: nox.Session) -> None:
"""Run all examples through the run_all.py script (pass args with: "-- <args>")."""

# TODO(#4704): clean that up when torch is 3.12 compatible
if session.python == "3.12":
session.run(
"pip", "install", "torch", "torchvision", "--pre", "--index-url", "https://download.pytorch.org/whl/nightly"
)

# Note: the run_all.py scripts installs all dependencies itself. In particular, we can install from
# examples/python/requirements.txt because it includes pyrealsense2, which is not available for mac.
session.run("python", "scripts/run_all.py", "--install-requirements", *session.posargs)
Expand All @@ -54,12 +41,6 @@ def roundtrips(session: nox.Session) -> None:

session.install("-r", "rerun_py/requirements-build.txt")
session.install("opencv-python")

# TODO(#4704): clean that up when torch is 3.12 compatible
if session.python == "3.12":
session.run(
"pip", "install", "torch", "torchvision", "--pre", "--index-url", "https://download.pytorch.org/whl/nightly"
)
session.install("./rerun_py")

extra_args = []
Expand Down
3 changes: 1 addition & 2 deletions rerun_py/requirements-build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ maturin>=1.5.1
semver
wheel
pytest
#TODO(#4704): clean that up when pytorch is available for 3.12
torch>=2.0.1 ; python_version < "3.12"
torch>=2.0.1
3 changes: 1 addition & 2 deletions rerun_py/requirements-lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ attrs>=23.1.0 # for mypy to work
blackdoc==0.3.8
mypy==1.8.0
numpy>=1.23,<2 # For mypy plugin
#TODO(#4704): clean that up when pytorch is available for 3.12
torch>=2.0.1 ; python_version < "3.12"
torch>=2.0.1
pip-check-reqs==2.4.4 # Checks for missing deps in requirements.txt files
pytest # For mypy to work
ruff==0.2.2
Expand Down
3 changes: 1 addition & 2 deletions scripts/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ cryptography==38.0.4 # for scripts/upload_image.py
google-cloud-storage==2.9.0 # for scripts/upload_image.py
PyGithub==1.58.2 # for scripts/ci/generate_pr_summary.py and scripts/ci/update_pr_body.py
Pillow # for scripts/upload_image.py
#TODO(#4704): clean that up when pytorch is available for 3.12
torch ; python_version < "3.12"
torch
tqdm
requests
gitignore_parser # handle .gitignore
Loading