Skip to content

Commit

Permalink
Disabled pytorch for 3.12 in all requirements.txt + fixed the nox ses…
Browse files Browse the repository at this point in the history
…sion to install nightly on 3.12
  • Loading branch information
abey79 committed Jan 5, 2024
1 parent 34155ae commit 9b4b5b9
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/contrib_rerun_py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
# TODO(jleibs): understand why deps can't be installed in the same step as the wheel
shell: bash
run: |
pip install attrs>=23.1.0 numpy>=1.23 pillow pyarrow==14.0.1 pytest==7.1.2 torch==2.1.0 typing_extensions>=4.5
pip install attrs>=23.1.0 numpy>=1.23 pillow pyarrow==14.0.2 pytest==7.1.2 torch==2.1.0 typing_extensions>=4.5
- name: Get version
id: get-version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
shell: bash
run: |
pixi run pip uninstall rerun-sdk -y
pixi run pip install deprecated numpy>=1.23 pyarrow==10.0.1 pytest==7.1.2
pixi run pip install deprecated numpy>=1.23 pyarrow==14.0.2 pytest==7.1.2
pixi run pip install rerun-sdk --no-index --find-links wheel
- name: Verify built wheel version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_publish_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
pixi run pip install -r scripts/ci/requirements.txt
pixi run pip install -r scripts/ci/requirements-web-demo.txt
pixi run pip uninstall rerun-sdk -y
pixi run pip install deprecated numpy>=1.23 pyarrow==10.0.1 pytest==7.1.2
pixi run pip install deprecated numpy>=1.23 pyarrow==14.0.2 pytest==7.1.2
pixi run pip install rerun-sdk --no-index --find-links wheel
- name: Installed wheel version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_run_notebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
# TODO(jleibs): pull these deps from pyproject.toml
shell: bash
run: |
pip install deprecated numpy>=1.23 pillow>=9.5.0 pyarrow==14.0.1 pytest==7.1.2
pip install deprecated numpy>=1.23 pillow>=9.5.0 pyarrow==14.0.2 pytest==7.1.2
- name: Install downloaded wheel_artifact
# Now install the wheel using a specific version and --no-index to guarantee we get the version from
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_test_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:
# TODO(jleibs): understand why deps can't be installed in the same step as the wheel
shell: bash
run: |
pip install attrs>=23.1.0 numpy>=1.23 pillow pyarrow==14.0.1 pytest==7.1.2 torch==2.1.0 typing_extensions>=4.5
pip install attrs>=23.1.0 numpy>=1.23 pillow pyarrow==14.0.2 pytest==7.1.2 torch==2.1.0 typing_extensions>=4.5
- name: Get version
id: get-version
Expand Down
3 changes: 2 additions & 1 deletion examples/python/controlnet/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ opencv-python
pillow
diffusers
numpy
torch
#TODO(#4704): clean that up when pytorch is available for 3.12
torch ; python_version < "3.12"
transformers
rerun-sdk
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ pillow
requests>=2.31,<3
rerun-sdk
scipy
torch>=1.13.0
#TODO(#4704): clean that up when pytorch is available for 3.12
torch>1.13.0; python_version < "3.12"
transformers>=4.26.0
3 changes: 2 additions & 1 deletion examples/python/detect_and_track_objects/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ pillow
requests>=2.31,<3
rerun-sdk
timm==0.9.11
torch>=1.13.0
#TODO(#4704): clean that up when pytorch is available for 3.12
torch>=1.13.0 ; python_version < "3.12"
transformers
3 changes: 2 additions & 1 deletion examples/python/llm_embedding_ner/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
rerun-sdk
torch
#TODO(#4704): clean that up when pytorch is available for 3.12
torch ; python_version < "3.12"
transformers
umap-learn
5 changes: 3 additions & 2 deletions examples/python/segment_anything_model/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ numpy
opencv-python
requests>=2.31,<3
rerun-sdk
torch
torchvision
#TODO(#4704): clean that up when pytorch is available for 3.12
torch ; python_version < "3.12"
torchvision ; python_version < "3.12"
tqdm
6 changes: 6 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
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 Down
2 changes: 1 addition & 1 deletion pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ just = ">=1.15.0"
maturin = ">=0.14,<0.15"
mypy = "1.4.1"
pip = ">=23"
pyarrow = "14.0.1"
pyarrow = "14.0.2"
pytest = ">=7"
python = ">=3.8,<3.12"
ruff = "0.1.2"
Expand Down
4 changes: 2 additions & 2 deletions rerun_py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ dependencies = [
"attrs>=23.1.0",
"numpy>=1.23",
"pillow", # Used for JPEG encoding
"pyarrow==14.0.1",
"pyarrow==14.0.2",
"typing_extensions>=4.5", # Used for PEP-702 deprecated decorator
]
description = "The Rerun Logging SDK"
keywords = ["computer-vision", "logging", "rerun"]
name = "rerun-sdk"
requires-python = ">=3.8, <3.12" # TODO(#3699): Support Python 3.12
requires-python = ">=3.8, <3.13"

[[project.authors]]
email = "opensource@rerun.io"
Expand Down
3 changes: 2 additions & 1 deletion rerun_py/requirements-build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ maturin>=1.3.0
semver
wheel
pytest
#torch # needed for the test suite
#TODO(#4704): clean that up when pytorch is available for 3.12
torch>=2.0.1 ; python_version < "3.12"
3 changes: 2 additions & 1 deletion rerun_py/requirements-lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ attrs>=23.1.0 # for mypy to work
blackdoc==0.3.8
mypy==1.4.1
numpy>=1.24 # For mypy plugin
torch>=2.0.1
#TODO(#4704): clean that up when pytorch is available for 3.12
torch>=2.0.1 ; python_version < "3.12"
pip-check-reqs==2.4.4 # Checks for missing deps in requirements.txt files
pytest # For mypy to work
ruff==0.1.2
Expand Down
3 changes: 2 additions & 1 deletion scripts/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ 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
torch
#TODO(#4704): clean that up when pytorch is available for 3.12
torch ; python_version < "3.12"
tqdm
requests
gitignore_parser # handle .gitignore

0 comments on commit 9b4b5b9

Please sign in to comment.