Repository: Project-MONAI/MONAILabel (language: python)

Issue:
drop python 3.6 support
This is a follow-up to #378 and is possible as Slicer client upgraded to Python 3.9 from Python 3.6 (https://github.com/Project-MONAI/MONAILabel/pull/378#issuecomment-1021702308). 

Monai has dropped Python 3.6 support (https://github.com/Project-MONAI/MONAI/commit/e655b4e4898c314cbc9d4d6da8f70ff1162cab7e). PyTorch dropped Python 3.6 starting in version 1.11.0 (https://github.com/pytorch/pytorch/commit/dc5cda0cca429a3080f63e7b30b3e87d18df8601).

Python 3.6 official end of support date was 23rd Dec 2021.

Signed-off-by: James Butler <jbutler@sonovol.com>


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml
index d7a0e5b1d..1e2a50885 100644
--- a/.github/workflows/pythonapp.yml
+++ b/.github/workflows/pythonapp.yml
@@ -82,7 +82,7 @@ jobs:
         run: |
           sudo apt-get install openslide-tools -y
           python -m pip install --user --upgrade pip setuptools wheel
-          python -m pip install torch>=1.5 torchvision
+          python -m pip install torch>=1.6 torchvision
       - name: Build Package
         run: |
           python setup.py sdist bdist_wheel
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 0217981ca..c386ac3c4 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -37,7 +37,7 @@ jobs:
         run: |
           sudo apt-get install openslide-tools -y
           python -m pip install --user --upgrade pip setuptools wheel
-          python -m pip install torch>=1.5 torchvision
+          python -m pip install torch>=1.6 torchvision
       - name: Build Package
         run: |
           python setup.py sdist bdist_wheel --build-number $(date +'%Y%m%d%H%M')
diff --git a/monailabel/__init__.py b/monailabel/__init__.py
index ed4f5c9d3..4f036d772 100644
--- a/monailabel/__init__.py
+++ b/monailabel/__init__.py
@@ -15,7 +15,7 @@
 from ._version import get_versions
 
 PY_REQUIRED_MAJOR = 3
-PY_REQUIRED_MINOR = 6
+PY_REQUIRED_MINOR = 7
 
 version_dict = get_versions()
 __version__ = version_dict.get("version", "0+unknown")
diff --git a/pyproject.toml b/pyproject.toml
index 9ecb20f12..de02d8cd2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -2,7 +2,7 @@
 requires = [
   "wheel",
   "setuptools",
-  "torch>=1.5",
+  "torch>=1.6",
   "ninja",
 ]
 


Test patch:
diff --git a/.azure/azure-build-test-gpu-pipeline.yml b/.azure/azure-build-test-gpu-pipeline.yml
index d583ab26e..7df2b924e 100644
--- a/.azure/azure-build-test-gpu-pipeline.yml
+++ b/.azure/azure-build-test-gpu-pipeline.yml
@@ -72,7 +72,7 @@ stages:
               sudo apt-get install openslide-tools -y
               sudo npm install --global yarn
               python3 -m pip install --user --upgrade pip setuptools wheel
-              python3 -m pip install torch>=1.5 torchvision
+              python3 -m pip install torch>=1.6 torchvision
             displayName: 'Install dependencies'
           - script: |
               python setup.py sdist bdist_wheel