Unpin librosa and update SciPy pin (#72834)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72834

This removes the upper bound to librosa's pin and updates the scipy
pin since librosa 0.9 requires SciPy 1.2 or newer.

Test Plan: Imported from OSS

Reviewed By: ngimel

Differential Revision: D34386898

Pulled By: mruberry

fbshipit-source-id: db654bd337b474cd5a2ff8dbb9a659ed272728cf
(cherry picked from commit 4790e8180c)
This commit is contained in:
Peter Bell 2022-02-22 18:22:59 -08:00 committed by PyTorch MergeBot
parent 0947521268
commit facd6f0bea
3 changed files with 8 additions and 9 deletions

View File

@ -71,11 +71,9 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
# Install PyTorch conda deps, as per https://github.com/pytorch/pytorch README
# DO NOT install cmake here as it would install a version newer than 3.10, but
# we want to pin to version 3.10.
SCIPY_VERSION=1.1.0
if [ "$ANACONDA_PYTHON_VERSION" = "3.9" ]; then
# Install llvm-8 as it is required to compile llvmlite-0.30.0 from source
conda_install numpy=1.19.2 astunparse pyyaml mkl mkl-include setuptools cffi future six llvmdev=8.0.0 -c conda-forge
SCIPY_VERSION=1.6.0
elif [ "$ANACONDA_PYTHON_VERSION" = "3.8" ]; then
# Install llvm-8 as it is required to compile llvmlite-0.30.0 from source
conda_install numpy=1.18.5 astunparse pyyaml mkl mkl-include setuptools cffi future six llvmdev=8.0.0
@ -96,11 +94,11 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
conda_install nnpack -c killeent
# Install some other packages, including those needed for Python test reporting
# TODO: Why is scipy pinned
# Pin SciPy because of failing distribution tests (see #60347)
# Pin MyPy version because new errors are likely to appear with each release
# Pin hypothesis to avoid flakiness: https://github.com/pytorch/pytorch/issues/31136
as_jenkins pip install --progress-bar off pytest \
scipy==$SCIPY_VERSION \
scipy==1.6.3 \
scikit-image \
psutil \
unittest-xml-reporting \
@ -108,14 +106,15 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
hypothesis==4.53.2 \
expecttest==0.1.3 \
mypy==0.812 \
tb-nightly
tb-nightly \
librosa>=0.6.2
# Install numba only on python-3.8 or below
# For numba issue see https://github.com/pytorch/pytorch/issues/51511
if [[ $(python -c "import sys; print(int(sys.version_info < (3, 9)))") == "1" ]]; then
as_jenkins pip install --progress-bar off numba==0.54.1 "librosa>=0.6.2,<0.9.0"
as_jenkins pip install --progress-bar off numba==0.54.1
else
as_jenkins pip install --progress-bar off numba==0.49.0 "librosa>=0.6.2,<0.9.0"
as_jenkins pip install --progress-bar off numba==0.49.0
fi
# Update scikit-learn to a python-3.8 compatible version

View File

@ -7,7 +7,7 @@ source "$(dirname "${BASH_SOURCE[0]}")/macos-common.sh"
export PYTORCH_TEST_SKIP_NOARCH=1
conda install -y six
pip install -q hypothesis "expecttest==0.1.3" "librosa>=0.6.2,<0.9.0" "numba<=0.49.1" psutil "scipy==1.6.3"
pip install -q hypothesis "expecttest==0.1.3" "librosa>=0.6.2" "numba<=0.49.1" psutil "scipy==1.6.3"
# TODO move this to docker
pip install unittest-xml-reporting pytest

View File

@ -34,7 +34,7 @@ popd
:: The version is fixed to avoid flakiness: https://github.com/pytorch/pytorch/issues/31136
=======
pip install "ninja==1.10.0.post1" future "hypothesis==4.53.2" "expecttest==0.1.3" "librosa>=0.6.2,<0.9.0" psutil pillow unittest-xml-reporting pytest
pip install "ninja==1.10.0.post1" future "hypothesis==4.53.2" "expecttest==0.1.3" "librosa>=0.6.2" "scipy==1.6.3" psutil pillow unittest-xml-reporting pytest
if errorlevel 1 exit /b
if not errorlevel 0 exit /b