From feed9344a03b5aea4ff34949b05e89ed0abb701e Mon Sep 17 00:00:00 2001 From: Richard Zou Date: Wed, 8 Mar 2023 17:26:43 -0500 Subject: [PATCH] [release] Prepare dummy binary for 2.0 release (#1115) --- .circleci/config.yml | 4 ++-- .circleci/unittest/linux/scripts/install.sh | 4 ++-- .circleci/unittest/linux/scripts/run_test.sh | 3 ++- .circleci/unittest/windows/scripts/install.sh | 2 +- .circleci/unittest/windows/scripts/run_test.sh | 4 ++-- .github/workflows/wheels.yml | 4 ++-- setup.py | 10 +++++----- version.txt | 2 +- 8 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e38027905..d2573e396 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -256,13 +256,13 @@ workflows: name: unittest_linux_<< matrix.cu_version >>_py<< matrix.python_version >> matrix: parameters: - python_version: ["3.7", "3.8", "3.9", "3.10"] + python_version: ["3.8", "3.9", "3.10"] cu_version: ["cpu"] - unittest_linux_gpu: name: unittest_linux_<< matrix.cu_version >>_py<< matrix.python_version >> matrix: parameters: - python_version: ["3.7", "3.8", "3.9", "3.10"] + python_version: ["3.8", "3.9", "3.10"] cu_version: ["cu116"] - unittest_macos_cpu: diff --git a/.circleci/unittest/linux/scripts/install.sh b/.circleci/unittest/linux/scripts/install.sh index 22db3ddd8..22d3b4ea8 100755 --- a/.circleci/unittest/linux/scripts/install.sh +++ b/.circleci/unittest/linux/scripts/install.sh @@ -53,11 +53,11 @@ gcc --version pip install expecttest if [ "${CU_VERSION:-}" == cpu ] ; then - conda install -y pytorch torchvision cpuonly -c pytorch-nightly + conda install -y pytorch=2.0 torchvision cpuonly -c pytorch-test PYTORCH_VERSION="$(python -c "import torch; print(torch.__version__)")" python setup.py develop bdist_wheel -d $WHEELS_FOLDER pip install functorch -f $WHEELS_FOLDER else - conda install pytorch torchvision pytorch-cuda=11.6 -c pytorch-nightly -c nvidia + conda install pytorch=2.0 torchvision pytorch-cuda=11.6 -c pytorch-test -c nvidia PYTORCH_VERSION="$(python -c "import torch; print(torch.__version__)")" python setup.py develop bdist_wheel -d $WHEELS_FOLDER pip install functorch -f $WHEELS_FOLDER fi diff --git a/.circleci/unittest/linux/scripts/run_test.sh b/.circleci/unittest/linux/scripts/run_test.sh index 177a6ed6a..8221b8a89 100755 --- a/.circleci/unittest/linux/scripts/run_test.sh +++ b/.circleci/unittest/linux/scripts/run_test.sh @@ -19,7 +19,8 @@ echo git_version git clone https://github.com/pytorch/pytorch.git pushd pytorch git checkout $git_version +pushd test pushd functorch -find test \( -name test\*.py ! -name test_functorch_lagging_op_db.py \) | xargs -I {} -n 1 python {} -v || EXIT_STATUS=$? +find . \( -name test\*.py \) | xargs -I {} -n 1 python {} -v || EXIT_STATUS=$? exit $EXIT_STATUS diff --git a/.circleci/unittest/windows/scripts/install.sh b/.circleci/unittest/windows/scripts/install.sh index d425b2b71..592ccb363 100644 --- a/.circleci/unittest/windows/scripts/install.sh +++ b/.circleci/unittest/windows/scripts/install.sh @@ -28,7 +28,7 @@ else fi printf "Installing PyTorch with %s\n" "${cudatoolkit}" -conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c nvidia "pytorch-${UPLOAD_CHANNEL}"::pytorch[build="*${version}*"] "${cudatoolkit}" +conda install -y pytorch torchvision "${cudatoolkit}" -c pytorch-test torch_cuda=$(python -c "import torch; print(torch.cuda.is_available())") echo torch.cuda.is_available is $torch_cuda diff --git a/.circleci/unittest/windows/scripts/run_test.sh b/.circleci/unittest/windows/scripts/run_test.sh index 830c414a5..1fe5c4988 100644 --- a/.circleci/unittest/windows/scripts/run_test.sh +++ b/.circleci/unittest/windows/scripts/run_test.sh @@ -19,6 +19,6 @@ echo git_version git clone https://github.com/pytorch/pytorch.git pushd pytorch git checkout $git_version -pushd functorch +pushd test -pytest test +pytest functorch diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 566a7c80b..cff9a405c 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -4,7 +4,7 @@ on: types: [opened, synchronize, reopened] push: branches: - - main + - release/2.0 jobs: @@ -20,7 +20,7 @@ jobs: uses: actions/checkout@v2 - name: Install PyTorch Nightly run: | - python3 -mpip install --pre torch>=1.13.0.dev -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html + python3 -mpip install --pre torch==2.0 -f https://download.pytorch.org/whl/test/cpu/torch_test.html - name: Build wheel run: | python3 -mpip install wheel diff --git a/setup.py b/setup.py index 5f9410fe9..fb61c07db 100644 --- a/setup.py +++ b/setup.py @@ -19,16 +19,16 @@ sha = 'Unknown' package_name = 'functorch' -if os.getenv('BUILD_VERSION'): - version = os.getenv('BUILD_VERSION') -elif sha != 'Unknown': - version += '+' + sha[:7] +# if os.getenv('BUILD_VERSION'): +# version = os.getenv('BUILD_VERSION') +# elif sha != 'Unknown': +# version += '+' + sha[:7] requirements = [ # This represents a nightly version of PyTorch. # It can be installed as a binary or from source. - "torch>=1.14.0.dev", + "torch>=2.0,<2.1", ] extras = {} diff --git a/version.txt b/version.txt index 59c85dbc8..227cea215 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.14.0a0 +2.0.0