From f2a1b8b318783678de99ca4c04ea343e1bf05bbd Mon Sep 17 00:00:00 2001 From: Yao You Date: Fri, 31 Jan 2025 13:18:31 -0600 Subject: [PATCH] feat: pin torch version - torch is a critical dep - pin it down avoids unexpected model performance changes or compatibility issues --- requirements/base.in | 6 ++++-- requirements/base.txt | 18 +++++++++--------- requirements/constraints.in | 1 + requirements/dev.txt | 18 +++++++++--------- requirements/test.txt | 10 +++++----- 5 files changed, 28 insertions(+), 25 deletions(-) diff --git a/requirements/base.in b/requirements/base.in index a7781de8..bf17b0b0 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -6,7 +6,9 @@ opencv-python!=4.7.0.68 onnx onnxruntime>=1.17.0 matplotlib -torch +# NOTE (yao): torch is a core dependency and its version changes may change model results so we pin +# it to specific verions and only bump via intentional PRs +torch==2.5.1 timm # NOTE(alan): Pinned because this is when the most recent module we import appeared transformers>=4.25.1 @@ -14,4 +16,4 @@ rapidfuzz pandas scipy pypdfium2 -pdfminer-six==20240706 \ No newline at end of file +pdfminer-six==20240706 diff --git a/requirements/base.txt b/requirements/base.txt index f0a9a6b3..9776373a 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -4,7 +4,7 @@ # # pip-compile requirements/base.in # -certifi==2024.12.14 +certifi==2025.1.31 # via requests cffi==1.17.1 # via cryptography @@ -20,20 +20,20 @@ cryptography==44.0.0 # via pdfminer-six cycler==0.12.1 # via matplotlib -filelock==3.16.1 +filelock==3.17.0 # via # huggingface-hub # torch # transformers -flatbuffers==24.12.23 +flatbuffers==25.1.24 # via onnxruntime -fonttools==4.55.4 +fonttools==4.55.8 # via matplotlib fsspec==2024.12.0 # via # huggingface-hub # torch -huggingface-hub==0.27.1 +huggingface-hub==0.28.1 # via # -r requirements/base.in # timm @@ -105,14 +105,14 @@ python-dateutil==2.9.0.post0 # pandas python-multipart==0.0.20 # via -r requirements/base.in -pytz==2024.2 +pytz==2025.1 # via pandas pyyaml==6.0.2 # via # huggingface-hub # timm # transformers -rapidfuzz==3.11.0 +rapidfuzz==3.12.1 # via -r requirements/base.in regex==2024.11.6 # via transformers @@ -147,13 +147,13 @@ tqdm==4.67.1 # via # huggingface-hub # transformers -transformers==4.48.1 +transformers==4.48.2 # via -r requirements/base.in typing-extensions==4.12.2 # via # huggingface-hub # torch -tzdata==2024.2 +tzdata==2025.1 # via pandas urllib3==2.3.0 # via requests diff --git a/requirements/constraints.in b/requirements/constraints.in index e69de29b..802ad03b 100644 --- a/requirements/constraints.in +++ b/requirements/constraints.in @@ -0,0 +1 @@ +tritonserver[gprc] diff --git a/requirements/dev.txt b/requirements/dev.txt index ed449e59..d449a20a 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -21,7 +21,7 @@ asttokens==3.0.0 # via stack-data async-lru==2.0.4 # via jupyterlab -attrs==24.3.0 +attrs==25.1.0 # via # jsonschema # referencing @@ -33,7 +33,7 @@ bleach[css]==6.2.0 # via nbconvert build==1.2.2.post1 # via pip-tools -certifi==2024.12.14 +certifi==2025.1.31 # via # -c requirements/base.txt # -c requirements/test.txt @@ -76,11 +76,11 @@ exceptiongroup==1.2.2 # -c requirements/test.txt # anyio # ipython -executing==2.1.0 +executing==2.2.0 # via stack-data fastjsonschema==2.21.1 # via nbformat -fonttools==4.55.4 +fonttools==4.55.8 # via # -c requirements/base.txt # matplotlib @@ -186,7 +186,7 @@ jupyter-server==2.15.0 # notebook-shim jupyter-server-terminals==0.5.3 # via jupyter-server -jupyterlab==4.3.4 +jupyterlab==4.3.5 # via # jupyter # notebook @@ -215,11 +215,11 @@ matplotlib-inline==0.1.7 # via # ipykernel # ipython -mistune==3.1.0 +mistune==3.1.1 # via nbconvert nbclient==0.10.2 # via nbconvert -nbconvert==7.16.5 +nbconvert==7.16.6 # via # jupyter # jupyter-server @@ -315,13 +315,13 @@ pyyaml==6.0.2 # -c requirements/base.txt # -c requirements/test.txt # jupyter-events -pyzmq==26.2.0 +pyzmq==26.2.1 # via # ipykernel # jupyter-client # jupyter-console # jupyter-server -referencing==0.36.1 +referencing==0.36.2 # via # jsonschema # jsonschema-specifications diff --git a/requirements/test.txt b/requirements/test.txt index 6e3f0b28..8364a808 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -6,9 +6,9 @@ # anyio==4.8.0 # via httpx -black==24.10.0 +black==25.1.0 # via -r requirements/test.in -certifi==2024.12.14 +certifi==2025.1.31 # via # -c requirements/base.txt # httpcore @@ -30,7 +30,7 @@ exceptiongroup==1.2.2 # via # anyio # pytest -filelock==3.16.1 +filelock==3.17.0 # via # -c requirements/base.txt # huggingface-hub @@ -50,7 +50,7 @@ httpcore==1.0.7 # via httpx httpx==0.28.1 # via -r requirements/test.in -huggingface-hub==0.27.1 +huggingface-hub==0.28.1 # via # -c requirements/base.txt # -r requirements/test.in @@ -110,7 +110,7 @@ requests==2.32.3 # via # -c requirements/base.txt # huggingface-hub -ruff==0.9.2 +ruff==0.9.4 # via -r requirements/test.in sniffio==1.3.1 # via anyio