From 4fc6f8a727de7b18d112e3f592257a7c809e7eef Mon Sep 17 00:00:00 2001 From: Alex Lee Date: Thu, 5 Sep 2024 14:47:12 +0200 Subject: [PATCH 01/10] Upgrade the required python version to python>=3.10 --- README.md | 2 +- docs/docs/index.md | 2 +- docs/docs/install.md | 4 ++-- pyproject.toml | 4 ++-- zamba/models/config.py | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9c97074b..20dd0b2e 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Visit https://zamba.drivendata.org/docs/ for full documentation and tutorials. First, make sure you have the prerequisites installed: -* Python 3.8 or 3.9 +* Python >= 3.10 * FFmpeg > 4.3 Then run: diff --git a/docs/docs/index.md b/docs/docs/index.md index 3ec90bfe..288a0615 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -29,7 +29,7 @@ We encourage people to share their custom models trained with Zamba. If you trai First, make sure you have the prerequisites installed: -* Python 3.8 or 3.9 +* Python >= 3.10 * FFmpeg > 4.3 Then run: diff --git a/docs/docs/install.md b/docs/docs/install.md index 04389149..f587d56f 100644 --- a/docs/docs/install.md +++ b/docs/docs/install.md @@ -9,10 +9,10 @@ GPU configurations. Prerequisites: - - Python 3.8 or 3.9 + - Python >= 3.10 - FFmpeg -#### [Python](https://www.python.org/) 3.8 or 3.9 +#### [Python](https://www.python.org/) >= 3.10 We recommend [Python installation using Anaconda](https://www.anaconda.com/download/) for all platforms. For more information about how to install Anaconda, here are some useful YouTube videos of installation: diff --git a/pyproject.toml b/pyproject.toml index e6096069..d2b2bdf1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ] -requires-python = ">=3.8" +requires-python = ">=3.10" dependencies = [ "appdirs", "av", @@ -38,7 +38,7 @@ dependencies = [ "pytorchvideo", "scikit-learn", "tensorboard", - "thop==0.0.31.post2005241907", + "thop", "timm", "torch", "torchinfo", diff --git a/zamba/models/config.py b/zamba/models/config.py index bd826381..ba28e111 100644 --- a/zamba/models/config.py +++ b/zamba/models/config.py @@ -428,7 +428,7 @@ class TrainConfig(ZambaBaseModel): data_dir: DirectoryPath = "" checkpoint: Optional[FilePath] = None scheduler_config: Optional[Union[str, SchedulerConfig]] = "default" - model_name: Optional[ModelEnum] = ModelEnum.time_distributed + model_name: Optional[ModelEnum] = ModelEnum.time_distributed.value dry_run: Union[bool, int] = False batch_size: int = 2 auto_lr_find: bool = False @@ -749,7 +749,7 @@ class PredictConfig(ZambaBaseModel): data_dir: DirectoryPath = "" filepaths: Optional[FilePath] = None checkpoint: Optional[FilePath] = None - model_name: Optional[ModelEnum] = ModelEnum.time_distributed + model_name: Optional[ModelEnum] = ModelEnum.time_distributed.value gpus: int = GPUS_AVAILABLE num_workers: int = 3 batch_size: int = 2 From 2d725ab9667772e7fd92de2cbfc6b9177a98c663 Mon Sep 17 00:00:00 2001 From: Alex Lee Date: Fri, 6 Sep 2024 09:58:45 +0200 Subject: [PATCH 02/10] Pinning to 3.11 and 3.12 for the python test, release, and doc versions --- .github/workflows/docs-latest.yml | 2 +- .github/workflows/docs-preview.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/tests.yml | 6 +++--- Makefile | 2 +- README.md | 2 +- docs/docs/index.md | 2 +- docs/docs/install.md | 4 ++-- pyproject.toml | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docs-latest.yml b/.github/workflows/docs-latest.yml index f25f9a65..d415d0a9 100644 --- a/.github/workflows/docs-latest.yml +++ b/.github/workflows/docs-latest.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Python and uv uses: drivendataorg/setup-python-uv-action@v1 with: - python-version: 3.8 + python-version: 3.11 - name: Install dependencies run: | diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml index cab977db..de851960 100644 --- a/.github/workflows/docs-preview.yml +++ b/.github/workflows/docs-preview.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Python and uv uses: drivendataorg/setup-python-uv-action@v1 with: - python-version: 3.8 + python-version: 3.11 - name: Install dependencies run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea35307b..90bf881c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Python and uv uses: drivendataorg/setup-python-uv-action@v1 with: - python-version: 3.8 + python-version: 3.11 - name: Install dependencies run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8328569c..9a996285 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,7 +22,7 @@ jobs: - name: Set up Python and uv uses: drivendataorg/setup-python-uv-action@v1 with: - python-version: 3.8 + python-version: [3.11] - name: Install dependencies run: | @@ -41,7 +41,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - python-version: [3.8, 3.9] + python-version: [3.11, 3.12] steps: - if: matrix.os == 'ubuntu-latest' @@ -119,7 +119,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: [3.8] + python-version: [3.11] steps: - name: Remove unused software diff --git a/Makefile b/Makefile index 7bbe886a..11589994 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ PROJECT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) PROJECT_NAME = zamba -PYTHON_VERSION = 3.8 +PYTHON_VERSION = 3.11 PYTHON_INTERPRETER = python ifeq (, $(shell which nvidia-smi)) diff --git a/README.md b/README.md index 20dd0b2e..df73170a 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Visit https://zamba.drivendata.org/docs/ for full documentation and tutorials. First, make sure you have the prerequisites installed: -* Python >= 3.10 +* Python >= 3.11 * FFmpeg > 4.3 Then run: diff --git a/docs/docs/index.md b/docs/docs/index.md index 288a0615..a702a0a2 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -29,7 +29,7 @@ We encourage people to share their custom models trained with Zamba. If you trai First, make sure you have the prerequisites installed: -* Python >= 3.10 +* Python >= 3.11 * FFmpeg > 4.3 Then run: diff --git a/docs/docs/install.md b/docs/docs/install.md index f587d56f..02b90623 100644 --- a/docs/docs/install.md +++ b/docs/docs/install.md @@ -9,10 +9,10 @@ GPU configurations. Prerequisites: - - Python >= 3.10 + - Python >= 3.11 - FFmpeg -#### [Python](https://www.python.org/) >= 3.10 +#### [Python](https://www.python.org/) >= 3.11 We recommend [Python installation using Anaconda](https://www.anaconda.com/download/) for all platforms. For more information about how to install Anaconda, here are some useful YouTube videos of installation: diff --git a/pyproject.toml b/pyproject.toml index d2b2bdf1..ba63e599 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ] -requires-python = ">=3.10" +requires-python = ">=3.11" dependencies = [ "appdirs", "av", From f243fa7f82780f9f3adfcaad2b8142043f60e68e Mon Sep 17 00:00:00 2001 From: Alex Lee Date: Mon, 9 Sep 2024 09:41:47 +0200 Subject: [PATCH 03/10] Responding to PR comments --- .github/workflows/tests.yml | 4 ++-- README.md | 2 +- docs/docs/index.md | 2 +- docs/docs/install.md | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9a996285..340ddded 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,7 +22,7 @@ jobs: - name: Set up Python and uv uses: drivendataorg/setup-python-uv-action@v1 with: - python-version: [3.11] + python-version: 3.11 - name: Install dependencies run: | @@ -119,7 +119,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: [3.11] + python-version: 3.11 steps: - name: Remove unused software diff --git a/README.md b/README.md index df73170a..c433f9e4 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Visit https://zamba.drivendata.org/docs/ for full documentation and tutorials. First, make sure you have the prerequisites installed: -* Python >= 3.11 +* Python 3.11 or 3.12 * FFmpeg > 4.3 Then run: diff --git a/docs/docs/index.md b/docs/docs/index.md index a702a0a2..7e77a5a6 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -29,7 +29,7 @@ We encourage people to share their custom models trained with Zamba. If you trai First, make sure you have the prerequisites installed: -* Python >= 3.11 +* Python 3.11 or 3.12 * FFmpeg > 4.3 Then run: diff --git a/docs/docs/install.md b/docs/docs/install.md index 02b90623..e8826f55 100644 --- a/docs/docs/install.md +++ b/docs/docs/install.md @@ -9,10 +9,10 @@ GPU configurations. Prerequisites: - - Python >= 3.11 + - Python 3.11 or 3.12 - FFmpeg -#### [Python](https://www.python.org/) >= 3.11 +#### [Python](https://www.python.org/) 3.11 or 3.12 We recommend [Python installation using Anaconda](https://www.anaconda.com/download/) for all platforms. For more information about how to install Anaconda, here are some useful YouTube videos of installation: From 74d54491eab01178506a9274b803aad53160da4e Mon Sep 17 00:00:00 2001 From: Alex Lee Date: Mon, 9 Sep 2024 18:36:01 +0200 Subject: [PATCH 04/10] fixing matrix in ga --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 340ddded..25180b90 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -119,7 +119,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: 3.11 + python-version: [3.11] steps: - name: Remove unused software From c8a25cd942e9f79709cbdbe0c214e77fb35e592a Mon Sep 17 00:00:00 2001 From: Alex Lee Date: Tue, 10 Sep 2024 07:30:58 +0200 Subject: [PATCH 05/10] Pinning to python 3.11 --- .github/workflows/tests.yml | 2 +- README.md | 2 +- docs/docs/index.md | 2 +- docs/docs/install.md | 4 ++-- pyproject.toml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 25180b90..6964fca4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,7 +41,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - python-version: [3.11, 3.12] + python-version: [3.11] steps: - if: matrix.os == 'ubuntu-latest' diff --git a/README.md b/README.md index c433f9e4..d33816c7 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Visit https://zamba.drivendata.org/docs/ for full documentation and tutorials. First, make sure you have the prerequisites installed: -* Python 3.11 or 3.12 +* Python 3.11 * FFmpeg > 4.3 Then run: diff --git a/docs/docs/index.md b/docs/docs/index.md index 7e77a5a6..aefee151 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -29,7 +29,7 @@ We encourage people to share their custom models trained with Zamba. If you trai First, make sure you have the prerequisites installed: -* Python 3.11 or 3.12 +* Python 3.11 * FFmpeg > 4.3 Then run: diff --git a/docs/docs/install.md b/docs/docs/install.md index e8826f55..a40da9d9 100644 --- a/docs/docs/install.md +++ b/docs/docs/install.md @@ -9,10 +9,10 @@ GPU configurations. Prerequisites: - - Python 3.11 or 3.12 + - Python 3.11 - FFmpeg -#### [Python](https://www.python.org/) 3.11 or 3.12 +#### [Python](https://www.python.org/) 3.11 We recommend [Python installation using Anaconda](https://www.anaconda.com/download/) for all platforms. For more information about how to install Anaconda, here are some useful YouTube videos of installation: diff --git a/pyproject.toml b/pyproject.toml index ba63e599..715e3416 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ] -requires-python = ">=3.11" +requires-python = ">=3.11,<=3.12" dependencies = [ "appdirs", "av", From 1bc86b4a6248bcd6507aa991bb0649988d46d702 Mon Sep 17 00:00:00 2001 From: Alex Lee Date: Wed, 11 Sep 2024 11:41:42 +0200 Subject: [PATCH 06/10] pinning to 3.11 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 715e3416..7272c633 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ] -requires-python = ">=3.11,<=3.12" +requires-python = ">=3.11,<3.12" dependencies = [ "appdirs", "av", From 255b9f2297d53e23956f8c10359f98ee6d5a2fe5 Mon Sep 17 00:00:00 2001 From: Alex Lee Date: Fri, 13 Sep 2024 09:41:21 +0200 Subject: [PATCH 07/10] upgrading to v4 codecov github action --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6964fca4..82abbe3c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -106,7 +106,7 @@ jobs: make densepose-tests - name: Upload coverage to codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml From ac280d429f1a3676f4f25fad2b7e37661984b776 Mon Sep 17 00:00:00 2001 From: Alex Lee Date: Sat, 14 Sep 2024 18:40:48 +0200 Subject: [PATCH 08/10] Removing the cap on the densepose pytorch versions --- .github/workflows/tests.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 82abbe3c..e12b60e7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -101,7 +101,7 @@ jobs: ZAMBA_RUN_DENSEPOSE_TESTS: 1 run: | uv pip install flit-core - # torch is alread installed, so just add the densepose extra + # torch is already installed, so just add the densepose extra uv pip install -e .[densepose] --no-build-isolation make densepose-tests diff --git a/pyproject.toml b/pyproject.toml index 7272c633..d121b5b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ tests = [ "wheel", ] densepose = [ - "torch<2.1.0", # densepose broken after 2.1.0; https://github.com/facebookresearch/detectron2/issues/5110 + "torch", "detectron2 @ git+https://github.com/facebookresearch/detectron2.git", "detectron2-densepose @ git+https://github.com/facebookresearch/detectron2@main#subdirectory=projects/DensePose" ] From 12cdafa3dc2a5df492c25f06d63f7f6814d854cd Mon Sep 17 00:00:00 2001 From: Alex Lee Date: Sat, 14 Sep 2024 18:43:04 +0200 Subject: [PATCH 09/10] updating the docs --- .github/workflows/tests.yml | 4 ++-- README.md | 2 +- docs/docs/index.md | 2 +- docs/docs/install.md | 4 ++-- pyproject.toml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e12b60e7..b6784b0c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,7 +41,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - python-version: [3.11] + python-version: [3.11, 3.12] steps: - if: matrix.os == 'ubuntu-latest' @@ -119,7 +119,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: [3.11] + python-version: [3.11, 3.12] steps: - name: Remove unused software diff --git a/README.md b/README.md index d33816c7..c433f9e4 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Visit https://zamba.drivendata.org/docs/ for full documentation and tutorials. First, make sure you have the prerequisites installed: -* Python 3.11 +* Python 3.11 or 3.12 * FFmpeg > 4.3 Then run: diff --git a/docs/docs/index.md b/docs/docs/index.md index aefee151..7e77a5a6 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -29,7 +29,7 @@ We encourage people to share their custom models trained with Zamba. If you trai First, make sure you have the prerequisites installed: -* Python 3.11 +* Python 3.11 or 3.12 * FFmpeg > 4.3 Then run: diff --git a/docs/docs/install.md b/docs/docs/install.md index a40da9d9..e8826f55 100644 --- a/docs/docs/install.md +++ b/docs/docs/install.md @@ -9,10 +9,10 @@ GPU configurations. Prerequisites: - - Python 3.11 + - Python 3.11 or 3.12 - FFmpeg -#### [Python](https://www.python.org/) 3.11 +#### [Python](https://www.python.org/) 3.11 or 3.12 We recommend [Python installation using Anaconda](https://www.anaconda.com/download/) for all platforms. For more information about how to install Anaconda, here are some useful YouTube videos of installation: diff --git a/pyproject.toml b/pyproject.toml index d121b5b0..75813a22 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ] -requires-python = ">=3.11,<3.12" +requires-python = ">=3.11,<3.13" dependencies = [ "appdirs", "av", From 20083ec9c60dfe762f0bfe9742e75e5d9967138c Mon Sep 17 00:00:00 2001 From: Alex Lee Date: Sun, 15 Sep 2024 07:35:23 +0200 Subject: [PATCH 10/10] unsetting the upper bound --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 75813a22..452f036d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ] -requires-python = ">=3.11,<3.13" +requires-python = ">=3.11" dependencies = [ "appdirs", "av",