From 83abcc0522829c49a3a0932a95baf5c3c3f95465 Mon Sep 17 00:00:00 2001 From: Darwin Bautista Date: Mon, 21 Aug 2023 15:06:35 +0800 Subject: [PATCH] Switch to Python >= 3.9 and update deps to latest - Fixes Dependabot alerts on scipy and tornado --- Makefile | 2 +- README.md | 2 +- requirements/bench.txt | 12 +-- requirements/constraints.txt | 188 +++++++++++++++-------------------- requirements/core.txt | 36 +++---- requirements/test.txt | 4 +- requirements/train.txt | 30 +++--- requirements/tune.txt | 107 ++++++++++---------- 8 files changed, 173 insertions(+), 208 deletions(-) diff --git a/Makefile b/Makefile index 6ceb7f2e..4a60a55d 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ PIP_COMPILE := pip-compile --quiet --no-header --allow-unsafe --resolver=backtra .PHONY: reqs clean-reqs help requirements/constraints.txt: requirements/*.in - CONSTRAINTS=/dev/null $(PIP_COMPILE) --strip-extras --output-file $@ $^ --extra-index-url https://download.pytorch.org/whl/cpu + CONSTRAINTS=/dev/null $(PIP_COMPILE) --output-file $@ $^ --extra-index-url https://download.pytorch.org/whl/cpu requirements/%.txt: requirements/%.in requirements/constraints.txt CONSTRAINTS=constraints.txt $(PIP_COMPILE) --no-annotate --output-file $@ $< diff --git a/README.md b/README.md index 5d0c6e94..e980a6d6 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ released under the BSD and MIT licenses, respectively (see corresponding `LICENS An [interactive Gradio demo](https://huggingface.co/spaces/baudm/PARSeq-OCR) hosted at Hugging Face is available. The pretrained weights released here are used for the demo. ### Installation -Requires Python >= 3.8 and PyTorch >= 1.10 (until 1.13). The default requirements files will install the latest versions of the dependencies (as of June 1, 2023). +Requires Python >= 3.9 and PyTorch >= 1.10 (until 1.13). The default requirements files will install the latest versions of the dependencies (as of August 21, 2023). ```bash # Use specific platform build. Other PyTorch 1.13 options: cu116, cu117, rocm5.2 platform=cpu diff --git a/requirements/bench.txt b/requirements/bench.txt index 83d370d3..07db4c0a 100644 --- a/requirements/bench.txt +++ b/requirements/bench.txt @@ -1,17 +1,15 @@ antlr4-python3-runtime==4.9.3 fvcore==0.1.5.post20221221 hydra-core==1.3.2 -importlib-resources==5.12.0 iopath==0.1.10 -numpy==1.24.3 +numpy==1.25.2 omegaconf==2.3.0 packaging==23.1 -pillow==9.5.0 +pillow==10.0.0 portalocker==2.7.0 -pyyaml==6.0 +pyyaml==6.0.1 tabulate==0.9.0 termcolor==2.3.0 -tqdm==4.65.0 -typing-extensions==4.6.2 +tqdm==4.66.1 +typing-extensions==4.7.1 yacs==0.1.8 -zipp==3.15.0 diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 6ae597c1..a3ffacca 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -12,22 +12,23 @@ antlr4-python3-runtime==4.9.3 # omegaconf asttokens==2.2.1 # via stack-data -async-timeout==4.0.2 +async-timeout==4.0.3 # via aiohttp attrs==23.1.0 # via # aiohttp # jsonschema # ray -ax-platform==0.3.2 + # referencing +ax-platform==0.3.4 # via -r requirements/tune.in backcall==0.2.0 # via ipython -botorch==0.8.5 +botorch==0.9.2 # via ax-platform certifi==2023.7.22 # via requests -charset-normalizer==3.1.0 +charset-normalizer==3.2.0 # via # aiohttp # requests @@ -35,43 +36,41 @@ click==8.0.4 # via # nltk # ray -comm==0.1.3 - # via ipykernel -contourpy==1.0.7 +comm==0.1.4 + # via ipywidgets +contourpy==1.1.0 # via matplotlib cycler==0.11.0 # via matplotlib -debugpy==1.6.7 - # via ipykernel decorator==5.1.1 # via ipython -distlib==0.3.6 +distlib==0.3.7 # via virtualenv executing==1.2.0 # via stack-data -filelock==3.12.0 +filelock==3.12.2 # via # huggingface-hub # ray # virtualenv -fonttools==4.39.4 +fonttools==4.42.1 # via matplotlib -frozenlist==1.3.3 +frozenlist==1.4.0 # via # aiohttp # aiosignal # ray -fsspec==2023.5.0 +fsspec==2023.6.0 # via # huggingface-hub # pytorch-lightning fvcore==0.1.5.post20221221 # via -r requirements/bench.in -gpytorch==1.10 +gpytorch==1.11 # via botorch grpcio==1.43.0 # via ray -huggingface-hub==0.15.1 +huggingface-hub==0.16.4 # via timm hydra-core==1.3.2 # via @@ -82,7 +81,7 @@ idna==3.4 # via # requests # yarl -imageio==2.30.0 +imageio==2.31.1 # via # imgaug # scikit-image @@ -90,48 +89,39 @@ imgaug==0.4.0 # via # -r requirements/train.in # -r requirements/tune.in -importlib-metadata==6.6.0 - # via jupyter-client -importlib-resources==5.12.0 - # via - # hydra-core - # jsonschema - # matplotlib +importlib-resources==6.0.1 + # via matplotlib iopath==0.1.10 # via fvcore -ipykernel==6.23.1 +ipython==8.14.0 # via ipywidgets -ipython==8.12.2 - # via - # ipykernel - # ipywidgets -ipywidgets==8.0.6 +ipywidgets==8.1.0 # via ax-platform -jedi==0.18.2 +jaxtyping==0.2.21 + # via linear-operator +jedi==0.19.0 # via ipython jinja2==3.1.2 # via ax-platform -joblib==1.2.0 +joblib==1.3.2 # via # nltk # scikit-learn -jsonschema==4.17.3 +jsonschema==4.19.0 # via ray -jupyter-client==8.2.0 - # via ipykernel -jupyter-core==5.3.0 - # via - # ipykernel - # jupyter-client -jupyterlab-widgets==3.0.7 +jsonschema-specifications==2023.7.1 + # via jsonschema +jupyterlab-widgets==3.0.8 # via ipywidgets kiwisolver==1.4.4 # via matplotlib -lazy-loader==0.2 +lazy-loader==0.3 # via scikit-image -lightning-utilities==0.8.0 - # via pytorch-lightning -linear-operator==0.4.0 +lightning-utilities==0.9.0 + # via + # pytorch-lightning + # torchmetrics +linear-operator==0.5.1 # via # botorch # gpytorch @@ -140,34 +130,31 @@ lmdb==1.4.1 # -r requirements/test.in # -r requirements/train.in # -r requirements/tune.in -markupsafe==2.1.2 +markupsafe==2.1.3 # via jinja2 -matplotlib==3.7.1 +matplotlib==3.7.2 # via imgaug matplotlib-inline==0.1.6 - # via - # ipykernel - # ipython + # via ipython msgpack==1.0.5 # via ray multidict==6.0.4 # via # aiohttp # yarl -multipledispatch==0.6.0 +multipledispatch==1.0.0 # via botorch -nest-asyncio==1.5.6 - # via ipykernel networkx==3.1 # via scikit-image nltk==3.8.1 # via -r requirements/core.in -numpy==1.24.3 +numpy==1.25.2 # via # contourpy # fvcore # imageio # imgaug + # jaxtyping # matplotlib # opencv-python # opt-einsum @@ -186,7 +173,7 @@ numpy==1.24.3 # torchvision omegaconf==2.3.0 # via hydra-core -opencv-python==4.7.0.72 +opencv-python==4.8.0.76 # via imgaug opt-einsum==3.3.0 # via pyro-ppl @@ -194,7 +181,6 @@ packaging==23.1 # via # huggingface-hub # hydra-core - # ipykernel # lightning-utilities # matplotlib # plotly @@ -202,7 +188,7 @@ packaging==23.1 # scikit-image # tensorboardx # torchmetrics -pandas==2.0.2 +pandas==2.0.3 # via # ax-platform # ray @@ -212,7 +198,7 @@ pexpect==4.8.0 # via ipython pickleshare==0.7.5 # via ipython -pillow==9.5.0 +pillow==10.0.0 # via # -r requirements/test.in # -r requirements/train.in @@ -223,41 +209,32 @@ pillow==9.5.0 # matplotlib # scikit-image # torchvision -pkgutil-resolve-name==1.3.10 - # via jsonschema -platformdirs==3.5.1 - # via - # jupyter-core - # virtualenv -plotly==5.14.1 +platformdirs==3.10.0 + # via virtualenv +plotly==5.16.1 # via ax-platform portalocker==2.7.0 # via iopath -prompt-toolkit==3.0.38 +prompt-toolkit==3.0.39 # via ipython protobuf==3.20.3 # via # ray # tensorboardx -psutil==5.9.5 - # via ipykernel ptyprocess==0.7.0 # via pexpect pure-eval==0.2.2 # via stack-data -pygments==2.15.1 +pygments==2.16.1 # via ipython pyparsing==3.0.9 # via matplotlib pyro-api==0.1.2 # via pyro-ppl -pyro-ppl==1.8.4 +pyro-ppl==1.8.6 # via botorch -pyrsistent==0.19.3 - # via jsonschema python-dateutil==2.8.2 # via - # jupyter-client # matplotlib # pandas pytorch-lightning==1.9.5 @@ -266,7 +243,7 @@ pytz==2023.3 # via pandas pywavelets==1.4.1 # via scikit-image -pyyaml==6.0 +pyyaml==6.0.1 # via # -r requirements/core.in # fvcore @@ -276,13 +253,13 @@ pyyaml==6.0 # ray # timm # yacs -pyzmq==25.1.0 - # via - # ipykernel - # jupyter-client ray==1.13.0 # via -r requirements/tune.in -regex==2023.5.5 +referencing==0.30.2 + # via + # jsonschema + # jsonschema-specifications +regex==2023.8.8 # via nltk requests==2.31.0 # via @@ -290,15 +267,19 @@ requests==2.31.0 # huggingface-hub # ray # torchvision -safetensors==0.3.1 +rpds-py==0.9.2 + # via + # jsonschema + # referencing +safetensors==0.3.2 # via timm -scikit-image==0.20.0 +scikit-image==0.21.0 # via imgaug -scikit-learn==1.2.2 +scikit-learn==1.3.0 # via # ax-platform # gpytorch -scipy==1.9.1 +scipy==1.11.2 # via # ax-platform # botorch @@ -313,7 +294,6 @@ six==1.16.0 # asttokens # grpcio # imgaug - # multipledispatch # python-dateutil stack-data==0.6.2 # via ipython @@ -321,19 +301,19 @@ tabulate==0.9.0 # via # fvcore # ray -tenacity==8.2.2 +tenacity==8.2.3 # via plotly -tensorboardx==2.6 +tensorboardx==2.6.2.2 # via # -r requirements/train.in # ray termcolor==2.3.0 # via fvcore -threadpoolctl==3.1.0 +threadpoolctl==3.2.0 # via scikit-learn -tifffile==2023.4.12 +tifffile==2023.8.12 # via scikit-image -timm==0.9.2 +timm==0.9.5 # via -r requirements/core.in torch==1.13.1+cpu # via @@ -345,17 +325,13 @@ torch==1.13.1+cpu # timm # torchmetrics # torchvision -torchmetrics==0.11.4 +torchmetrics==1.0.3 # via pytorch-lightning torchvision==0.14.1+cpu # via # -r requirements/core.in # timm -tornado==6.3.2 - # via - # ipykernel - # jupyter-client -tqdm==4.65.0 +tqdm==4.66.1 # via # -r requirements/test.in # fvcore @@ -367,39 +343,37 @@ tqdm==4.65.0 traitlets==5.9.0 # via # comm - # ipykernel # ipython # ipywidgets - # jupyter-client - # jupyter-core # matplotlib-inline typeguard==2.13.3 - # via ax-platform -typing-extensions==4.6.2 + # via + # ax-platform + # jaxtyping + # linear-operator +typing-extensions==4.7.1 # via # huggingface-hub # iopath # ipython + # jaxtyping # lightning-utilities # pytorch-lightning # torch - # torchmetrics # torchvision tzdata==2023.3 # via pandas -urllib3==2.0.2 +urllib3==2.0.4 # via requests -virtualenv==20.23.0 +virtualenv==20.24.3 # via ray wcwidth==0.2.6 # via prompt-toolkit -widgetsnbextension==4.0.7 +widgetsnbextension==4.0.8 # via ipywidgets yacs==0.1.8 # via fvcore yarl==1.9.2 # via aiohttp -zipp==3.15.0 - # via - # importlib-metadata - # importlib-resources +zipp==3.16.2 + # via importlib-resources diff --git a/requirements/core.txt b/requirements/core.txt index 92afa828..de052b5d 100644 --- a/requirements/core.txt +++ b/requirements/core.txt @@ -2,33 +2,33 @@ aiohttp==3.8.5 aiosignal==1.3.1 -async-timeout==4.0.2 +async-timeout==4.0.3 attrs==23.1.0 certifi==2023.7.22 -charset-normalizer==3.1.0 +charset-normalizer==3.2.0 click==8.0.4 -filelock==3.12.0 -frozenlist==1.3.3 -fsspec==2023.5.0 -huggingface-hub==0.15.1 +filelock==3.12.2 +frozenlist==1.4.0 +fsspec==2023.6.0 +huggingface-hub==0.16.4 idna==3.4 -joblib==1.2.0 -lightning-utilities==0.8.0 +joblib==1.3.2 +lightning-utilities==0.9.0 multidict==6.0.4 nltk==3.8.1 -numpy==1.24.3 +numpy==1.25.2 packaging==23.1 -pillow==9.5.0 +pillow==10.0.0 pytorch-lightning==1.9.5 -pyyaml==6.0 -regex==2023.5.5 +pyyaml==6.0.1 +regex==2023.8.8 requests==2.31.0 -safetensors==0.3.1 -timm==0.9.2 +safetensors==0.3.2 +timm==0.9.5 torch==1.13.1+cpu -torchmetrics==0.11.4 +torchmetrics==1.0.3 torchvision==0.14.1+cpu -tqdm==4.65.0 -typing-extensions==4.6.2 -urllib3==2.0.2 +tqdm==4.66.1 +typing-extensions==4.7.1 +urllib3==2.0.4 yarl==1.9.2 diff --git a/requirements/test.txt b/requirements/test.txt index 76e591ef..eb6a22a8 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,3 +1,3 @@ lmdb==1.4.1 -pillow==9.5.0 -tqdm==4.65.0 +pillow==10.0.0 +tqdm==4.66.1 diff --git a/requirements/train.txt b/requirements/train.txt index cd10c27b..e8659cdc 100644 --- a/requirements/train.txt +++ b/requirements/train.txt @@ -1,30 +1,30 @@ antlr4-python3-runtime==4.9.3 -contourpy==1.0.7 +contourpy==1.1.0 cycler==0.11.0 -fonttools==4.39.4 +fonttools==4.42.1 hydra-core==1.3.2 -imageio==2.30.0 +imageio==2.31.1 imgaug==0.4.0 -importlib-resources==5.12.0 +importlib-resources==6.0.1 kiwisolver==1.4.4 -lazy-loader==0.2 +lazy-loader==0.3 lmdb==1.4.1 -matplotlib==3.7.1 +matplotlib==3.7.2 networkx==3.1 -numpy==1.24.3 +numpy==1.25.2 omegaconf==2.3.0 -opencv-python==4.7.0.72 +opencv-python==4.8.0.76 packaging==23.1 -pillow==9.5.0 +pillow==10.0.0 protobuf==3.20.3 pyparsing==3.0.9 python-dateutil==2.8.2 pywavelets==1.4.1 -pyyaml==6.0 -scikit-image==0.20.0 -scipy==1.9.1 +pyyaml==6.0.1 +scikit-image==0.21.0 +scipy==1.11.2 shapely==2.0.1 six==1.16.0 -tensorboardx==2.6 -tifffile==2023.4.12 -zipp==3.15.0 +tensorboardx==2.6.2.2 +tifffile==2023.8.12 +zipp==3.16.2 diff --git a/requirements/tune.txt b/requirements/tune.txt index b8333043..abf1c7ad 100644 --- a/requirements/tune.txt +++ b/requirements/tune.txt @@ -2,100 +2,93 @@ aiosignal==1.3.1 antlr4-python3-runtime==4.9.3 asttokens==2.2.1 attrs==23.1.0 -ax-platform==0.3.2 +ax-platform==0.3.4 backcall==0.2.0 -botorch==0.8.5 +botorch==0.9.2 certifi==2023.7.22 -charset-normalizer==3.1.0 +charset-normalizer==3.2.0 click==8.0.4 -comm==0.1.3 -contourpy==1.0.7 +comm==0.1.4 +contourpy==1.1.0 cycler==0.11.0 -debugpy==1.6.7 decorator==5.1.1 -distlib==0.3.6 +distlib==0.3.7 executing==1.2.0 -filelock==3.12.0 -fonttools==4.39.4 -frozenlist==1.3.3 -gpytorch==1.10 +filelock==3.12.2 +fonttools==4.42.1 +frozenlist==1.4.0 +gpytorch==1.11 grpcio==1.43.0 hydra-core==1.3.2 idna==3.4 -imageio==2.30.0 +imageio==2.31.1 imgaug==0.4.0 -importlib-metadata==6.6.0 -importlib-resources==5.12.0 -ipykernel==6.23.1 -ipython==8.12.2 -ipywidgets==8.0.6 -jedi==0.18.2 +importlib-resources==6.0.1 +ipython==8.14.0 +ipywidgets==8.1.0 +jaxtyping==0.2.21 +jedi==0.19.0 jinja2==3.1.2 -joblib==1.2.0 -jsonschema==4.17.3 -jupyter-client==8.2.0 -jupyter-core==5.3.0 -jupyterlab-widgets==3.0.7 +joblib==1.3.2 +jsonschema==4.19.0 +jsonschema-specifications==2023.7.1 +jupyterlab-widgets==3.0.8 kiwisolver==1.4.4 -lazy-loader==0.2 -linear-operator==0.4.0 +lazy-loader==0.3 +linear-operator==0.5.1 lmdb==1.4.1 -markupsafe==2.1.2 -matplotlib==3.7.1 +markupsafe==2.1.3 +matplotlib==3.7.2 matplotlib-inline==0.1.6 msgpack==1.0.5 -multipledispatch==0.6.0 -nest-asyncio==1.5.6 +multipledispatch==1.0.0 networkx==3.1 -numpy==1.24.3 +numpy==1.25.2 omegaconf==2.3.0 -opencv-python==4.7.0.72 +opencv-python==4.8.0.76 opt-einsum==3.3.0 packaging==23.1 -pandas==2.0.2 +pandas==2.0.3 parso==0.8.3 pexpect==4.8.0 pickleshare==0.7.5 -pillow==9.5.0 -pkgutil-resolve-name==1.3.10 -platformdirs==3.5.1 -plotly==5.14.1 -prompt-toolkit==3.0.38 +pillow==10.0.0 +platformdirs==3.10.0 +plotly==5.16.1 +prompt-toolkit==3.0.39 protobuf==3.20.3 -psutil==5.9.5 ptyprocess==0.7.0 pure-eval==0.2.2 -pygments==2.15.1 +pygments==2.16.1 pyparsing==3.0.9 pyro-api==0.1.2 -pyro-ppl==1.8.4 -pyrsistent==0.19.3 +pyro-ppl==1.8.6 python-dateutil==2.8.2 pytz==2023.3 pywavelets==1.4.1 -pyyaml==6.0 -pyzmq==25.1.0 +pyyaml==6.0.1 ray==1.13.0 +referencing==0.30.2 requests==2.31.0 -scikit-image==0.20.0 -scikit-learn==1.2.2 -scipy==1.9.1 +rpds-py==0.9.2 +scikit-image==0.21.0 +scikit-learn==1.3.0 +scipy==1.11.2 shapely==2.0.1 six==1.16.0 stack-data==0.6.2 tabulate==0.9.0 -tenacity==8.2.2 -tensorboardx==2.6 -threadpoolctl==3.1.0 -tifffile==2023.4.12 -tornado==6.3.2 -tqdm==4.65.0 +tenacity==8.2.3 +tensorboardx==2.6.2.2 +threadpoolctl==3.2.0 +tifffile==2023.8.12 +tqdm==4.66.1 traitlets==5.9.0 typeguard==2.13.3 -typing-extensions==4.6.2 +typing-extensions==4.7.1 tzdata==2023.3 -urllib3==2.0.2 -virtualenv==20.23.0 +urllib3==2.0.4 +virtualenv==20.24.3 wcwidth==0.2.6 -widgetsnbextension==4.0.7 -zipp==3.15.0 +widgetsnbextension==4.0.8 +zipp==3.16.2