From bcdcbc63cc4ee4d27c7b6f24f25930b92048e0f8 Mon Sep 17 00:00:00 2001 From: Stefan Kapusniak <121311569+one-lithe-rune@users.noreply.github.com> Date: Thu, 21 Mar 2024 03:22:27 +0000 Subject: [PATCH] SHARK-1.0: Fixes to requirements for newer dependency versions (#2099) - Adds mpmath==1.3.0 as a direct requirement to workaround a sympy dependency issue. - Change setup_venv.ps1 to install torchvision --nodeps. This avoids a failure to find any common torch version dependency between the pinned torch-mlir version and torchvision after a long search. This also more closely matches what setup_venv.sh does. --- requirements.txt | 3 +++ setup_venv.ps1 | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index fa03decf00..94c95afbc3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -46,6 +46,9 @@ langchain einops # for zoedepth pydantic==2.4.1 # pin until pyinstaller-hooks-contrib works with beta versions +# mpmath sub-dependency, breaks sympy sub-dependency as of (1.4.0a0) version +mpmath==1.3.0 + # Keep PyInstaller at the end. Sometimes Windows Defender flags it but most folks can continue even if it errors pefile pyinstaller diff --git a/setup_venv.ps1 b/setup_venv.ps1 index 396cc27397..a063a34be8 100644 --- a/setup_venv.ps1 +++ b/setup_venv.ps1 @@ -89,7 +89,8 @@ else {python -m venv .\shark1.venv\} python -m pip install --upgrade pip pip install wheel pip install -r requirements.txt -pip install --pre torch-mlir==20231210.* torchvision torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu -f .\package-index-torch-mlir.html +pip install torchvision --no-deps -f https://download.pytorch.org/whl/nightly/cpu/torchvision/ +pip install --pre torch-mlir==20231210.* torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu -f .\package-index-torch-mlir.html pip install --upgrade -f https://nod-ai.github.io/SRT/pip-release-links.html iree-compiler==20231212.* iree-runtime==20231212.* Write-Host "Building SHARK..." pip install -e . -f .\package-index-torch-mlir.html -f https://nod-ai.github.io/SRT/pip-release-links.html