From b949580bb3b481d1a18a958a4f258968543e58a3 Mon Sep 17 00:00:00 2001 From: Xu Zhao Date: Mon, 17 Jun 2024 16:51:57 -0700 Subject: [PATCH] Upgrade numpy to 2.0.0rc (#2311) Summary: PyTorch upgraded to numpy 2.0.0rc1 which breaks a couple of models, we can fix all of them except DALLE2_pytorch. DALLE2_pytorch requires embeeding-reader, which requires numpy<2: https://github.com/rom1504/embedding-reader/blob/a4fd55830a502685600ed8ef07947cd1cb92b083/requirements.txt#L3 Therefore, we have to move DALLE2_pytorch to canary_models directory. Pytorch PR: https://github.com/pytorch/pytorch/pull/128879 Pytorch SEV: https://github.com/pytorch/pytorch/issues/128845 Pull Request resolved: https://github.com/pytorch/benchmark/pull/2311 Reviewed By: eellison Differential Revision: D58695403 Pulled By: xuzhao9 fbshipit-source-id: 052fa7c373089618686f99aec62c9ce4fd38e880 --- requirements.txt | 4 +--- .../{models => canary_models}/DALLE2_pytorch/__init__.py | 0 .../DALLE2_pytorch/dalle2_pytorch.patch | 0 .../{models => canary_models}/DALLE2_pytorch/install.py | 0 .../{models => canary_models}/DALLE2_pytorch/metadata.yaml | 0 .../{models => canary_models}/DALLE2_pytorch/origin | 0 .../{models => canary_models}/DALLE2_pytorch/requirements.txt | 0 torchbenchmark/models/doctr_det_predictor/requirements.txt | 2 +- torchbenchmark/models/doctr_reco_predictor/requirements.txt | 4 ++-- torchbenchmark/models/timm_efficientdet/requirements.txt | 4 ++-- 10 files changed, 6 insertions(+), 8 deletions(-) rename torchbenchmark/{models => canary_models}/DALLE2_pytorch/__init__.py (100%) rename torchbenchmark/{models => canary_models}/DALLE2_pytorch/dalle2_pytorch.patch (100%) rename torchbenchmark/{models => canary_models}/DALLE2_pytorch/install.py (100%) rename torchbenchmark/{models => canary_models}/DALLE2_pytorch/metadata.yaml (100%) rename torchbenchmark/{models => canary_models}/DALLE2_pytorch/origin (100%) rename torchbenchmark/{models => canary_models}/DALLE2_pytorch/requirements.txt (100%) diff --git a/requirements.txt b/requirements.txt index 3a1fe44421..b9d52c5b24 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,9 +15,7 @@ transformers==4.38.1 MonkeyType psutil pyyaml -# pytorch build script pins numpy version -# https://github.com/pytorch/builder/blob/main/wheel/build_wheel.sh -numpy==1.23.5 +numpy opencv-python submitit pynvml diff --git a/torchbenchmark/models/DALLE2_pytorch/__init__.py b/torchbenchmark/canary_models/DALLE2_pytorch/__init__.py similarity index 100% rename from torchbenchmark/models/DALLE2_pytorch/__init__.py rename to torchbenchmark/canary_models/DALLE2_pytorch/__init__.py diff --git a/torchbenchmark/models/DALLE2_pytorch/dalle2_pytorch.patch b/torchbenchmark/canary_models/DALLE2_pytorch/dalle2_pytorch.patch similarity index 100% rename from torchbenchmark/models/DALLE2_pytorch/dalle2_pytorch.patch rename to torchbenchmark/canary_models/DALLE2_pytorch/dalle2_pytorch.patch diff --git a/torchbenchmark/models/DALLE2_pytorch/install.py b/torchbenchmark/canary_models/DALLE2_pytorch/install.py similarity index 100% rename from torchbenchmark/models/DALLE2_pytorch/install.py rename to torchbenchmark/canary_models/DALLE2_pytorch/install.py diff --git a/torchbenchmark/models/DALLE2_pytorch/metadata.yaml b/torchbenchmark/canary_models/DALLE2_pytorch/metadata.yaml similarity index 100% rename from torchbenchmark/models/DALLE2_pytorch/metadata.yaml rename to torchbenchmark/canary_models/DALLE2_pytorch/metadata.yaml diff --git a/torchbenchmark/models/DALLE2_pytorch/origin b/torchbenchmark/canary_models/DALLE2_pytorch/origin similarity index 100% rename from torchbenchmark/models/DALLE2_pytorch/origin rename to torchbenchmark/canary_models/DALLE2_pytorch/origin diff --git a/torchbenchmark/models/DALLE2_pytorch/requirements.txt b/torchbenchmark/canary_models/DALLE2_pytorch/requirements.txt similarity index 100% rename from torchbenchmark/models/DALLE2_pytorch/requirements.txt rename to torchbenchmark/canary_models/DALLE2_pytorch/requirements.txt diff --git a/torchbenchmark/models/doctr_det_predictor/requirements.txt b/torchbenchmark/models/doctr_det_predictor/requirements.txt index a291164829..c0780e92a9 100644 --- a/torchbenchmark/models/doctr_det_predictor/requirements.txt +++ b/torchbenchmark/models/doctr_det_predictor/requirements.txt @@ -1 +1 @@ -git+https://github.com/mindee/doctr.git@56c8356 +python-doctr diff --git a/torchbenchmark/models/doctr_reco_predictor/requirements.txt b/torchbenchmark/models/doctr_reco_predictor/requirements.txt index 2f9c5c918f..76de2bd25e 100644 --- a/torchbenchmark/models/doctr_reco_predictor/requirements.txt +++ b/torchbenchmark/models/doctr_reco_predictor/requirements.txt @@ -1,2 +1,2 @@ -git+https://github.com/mindee/doctr.git@acb9f64 -rapidfuzz==2.15.1 +python-doctr +rapidfuzz diff --git a/torchbenchmark/models/timm_efficientdet/requirements.txt b/torchbenchmark/models/timm_efficientdet/requirements.txt index 2b82a288e8..2e3c8a1c8d 100644 --- a/torchbenchmark/models/timm_efficientdet/requirements.txt +++ b/torchbenchmark/models/timm_efficientdet/requirements.txt @@ -1,2 +1,2 @@ -pycocotools==2.0.6 -git+https://github.com/rwightman/efficientdet-pytorch.git@79d26d8 +pycocotools +git+https://github.com/rwightman/efficientdet-pytorch.git@d43c9e34cd62d22b4205831bb735f6dd83b8e881