Skip to content

Commit

Permalink
SHARK-1.0: Fixes to requirements for newer dependency versions (#2099)
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
one-lithe-rune committed Mar 21, 2024
1 parent 9fc0b5b commit bcdcbc6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion setup_venv.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bcdcbc6

Please sign in to comment.