Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update nightly wheel build numpy to 2.0 #1747

Merged
merged 3 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions aarch64_linux/aarch64_ci_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ conda create -y -c conda-forge -n "${CONDA_ENV_NAME}" python=${DESIRED_PYTHON}
conda activate "${CONDA_ENV_NAME}"

if [[ "$DESIRED_PYTHON" == "3.8" ]]; then
NUMPY_VERSION="1.24.4"
pip install -q numpy==1.24.4
else
NUMPY_VERSION="1.26.2"
pip install -q --pre numpy==2.0.0b1
fi
conda install -y -c conda-forge numpy==${NUMPY_VERSION} pyyaml==6.0.1 patchelf==0.17.2 pygit2==1.13.2 openblas==0.3.25=*openmp* ninja==1.11.1 scons==4.5.2
conda install -y -c conda-forge pyyaml==6.0.1 patchelf==0.17.2 pygit2==1.13.2 openblas==0.3.25=*openmp* ninja==1.11.1 scons==4.5.2

python --version
conda --version
12 changes: 3 additions & 9 deletions manywheel/build_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,12 @@ case ${DESIRED_PYTHON} in
cp38*)
retry pip install -q numpy==1.15
;;
cp310*)
retry pip install -q numpy==1.21.2
;;
cp311*)
retry pip install -q numpy==1.23.1
;;
cp312*)
retry pip install -q numpy==1.26.1
cp31*)
retry pip install -q --pre numpy==2.0.0b1
;;
# Should catch 3.9+
*)
retry pip install -q numpy==1.19.4
retry pip install -q --pre numpy==2.0.0b1
;;
esac

Expand Down
15 changes: 10 additions & 5 deletions wheel/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,25 +136,25 @@ case $desired_python in
echo "Using 3.12 deps"
SETUPTOOLS_PINNED_VERSION=">=68.0.0"
PYYAML_PINNED_VERSION=">=6.0.1"
NUMPY_PINNED_VERSION="==1.26.0"
NUMPY_PINNED_VERSION="=2.0.0b1"
;;
3.11)
echo "Using 3.11 deps"
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
PYYAML_PINNED_VERSION=">=5.3"
NUMPY_PINNED_VERSION="==1.23.5"
NUMPY_PINNED_VERSION="=2.0.0b1"
;;
3.10)
echo "Using 3.10 deps"
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
PYYAML_PINNED_VERSION=">=5.3"
NUMPY_PINNED_VERSION="=1.21.2"
NUMPY_PINNED_VERSION="=2.0.0b1"
;;
3.9)
echo "Using 3.9 deps"
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
PYYAML_PINNED_VERSION=">=5.3"
NUMPY_PINNED_VERSION="=1.19"
NUMPY_PINNED_VERSION="=2.0.0b1"
;;
3.8)
echo "Using 3.8 deps"
Expand All @@ -173,7 +173,12 @@ tmp_env_name="wheel_py$python_nodot"
conda create ${EXTRA_CONDA_INSTALL_FLAGS} -yn "$tmp_env_name" python="$desired_python"
source activate "$tmp_env_name"

retry conda install ${EXTRA_CONDA_INSTALL_FLAGS} -yq "numpy${NUMPY_PINNED_VERSION}" nomkl cmake ninja "setuptools${SETUPTOOLS_PINNED_VERSION}" "pyyaml${PYYAML_PINNED_VERSION}" typing_extensions requests
if [[ $desired_python != "3.8" ]]; then
pip install -q --pre numpy=${NUMPY_PINNED_VERSION}
else
retry conda install ${EXTRA_CONDA_INSTALL_FLAGS} -yq "numpy${NUMPY_PINNED_VERSION}"
fi
retry conda install ${EXTRA_CONDA_INSTALL_FLAGS} -yq nomkl cmake ninja "setuptools${SETUPTOOLS_PINNED_VERSION}" "pyyaml${PYYAML_PINNED_VERSION}" typing_extensions requests
retry pip install -qr "${pytorch_rootdir}/requirements.txt" || true

# For USE_DISTRIBUTED=1 on macOS, need libuv and pkg-config to find libuv.
Expand Down
8 changes: 7 additions & 1 deletion windows/internal/smoke_test.bat
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ if errorlevel 1 exit /b 1

set "PATH=%CD%\Python%PYTHON_VERSION%\Scripts;%CD%\Python;%PATH%"

pip install -q numpy protobuf

if "%DESIRED_PYTHON%" == "3.12" pip install -q --pre numpy==2.0.0b1 protobuf
if "%DESIRED_PYTHON%" == "3.11" pip install -q --pre numpy==2.0.0b1 protobuf
if "%DESIRED_PYTHON%" == "3.10" pip install -q --pre numpy==2.0.0b1 protobuf
if "%DESIRED_PYTHON%" == "3.9" pip install -q --pre numpy==2.0.0b1 protobuf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe we can make this an else to avoid having the same lines multiple times?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if "%DESIRED_PYTHON%" == "3.8" pip install -q numpy protobuf

if errorlevel 1 exit /b 1

for /F "delims=" %%i in ('where /R "%PYTORCH_FINAL_PACKAGE_DIR:/=\%" *.whl') do pip install "%%i"
Expand Down
Loading