From 490172da12a2e85f1a91b2a67b0063595a4c7279 Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 17 Feb 2023 10:11:18 -0800 Subject: [PATCH] Add windows 3.11 conda --- .circleci/config.yml | 34 ++++++++++++++++++++++++++++++++++ .circleci/config.yml.in | 3 +++ .circleci/regenerate.py | 6 ------ packaging/build_conda.sh | 5 +++++ packaging/pkg_helpers.bash | 2 +- 5 files changed, 43 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 23e27ac19c..a3c2f4a4c6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -369,6 +369,9 @@ jobs: conda env remove -n python${PYTHON_VERSION} || true conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda activate python${PYTHON_VERSION} + if [[ "${PYTHON_VERSION}" == "3.11" ]]; then + export CONDA_CHANNEL_FLAGS=" -c malfet" + fi conda install -v -y ${CONDA_CHANNEL_FLAGS} -c pytorch-"${UPLOAD_CHANNEL}" pytorch conda install -v -y ${CONDA_CHANNEL_FLAGS} -c ~/workspace/conda-bld torchtext - run: @@ -640,6 +643,9 @@ workflows: - binary_windows_conda: name: binary_windows_conda_py3.10 python_version: '3.10' + - binary_windows_conda: + name: binary_windows_conda_py3.11 + python_version: '3.11' - build_docs: filters: branches: @@ -885,6 +891,34 @@ workflows: python_version: '3.10' requires: - nightly_binary_windows_conda_py3.10_upload + - binary_windows_conda: + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_windows_conda_py3.11 + python_version: '3.11' + - binary_conda_upload: + context: org-member + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_windows_conda_py3.11_upload + requires: + - nightly_binary_windows_conda_py3.11 + - smoke_test_windows_conda: + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_windows_conda_py3.11_smoke_test_conda + python_version: '3.11' + requires: + - nightly_binary_windows_conda_py3.11_upload docker_build: triggers: - schedule: diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index 68dd97dcfe..c4d0dedd92 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -369,6 +369,9 @@ jobs: conda env remove -n python${PYTHON_VERSION} || true conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda activate python${PYTHON_VERSION} + if [[ "${PYTHON_VERSION}" == "3.11" ]]; then + export CONDA_CHANNEL_FLAGS=" -c malfet" + fi conda install -v -y ${CONDA_CHANNEL_FLAGS} -c pytorch-"${UPLOAD_CHANNEL}" pytorch conda install -v -y ${CONDA_CHANNEL_FLAGS} -c ~/workspace/conda-bld torchtext - run: diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index 9b0aa2b02a..08ba2112eb 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -44,12 +44,6 @@ def build_workflows(prefix="", upload=False, filter_branch=None, indentation=6): continue if os_type == "macos": continue - # Not supporting Python 3.11 conda packages at the - # moment since the necessary dependencies are not - # available. Windows 3.11 Wheels will be built from - # CircleCI here, however. - if python_version == "3.11" and btype == "conda": - continue w += build_workflow_pair(btype, os_type, python_version, fb, prefix, upload) diff --git a/packaging/build_conda.sh b/packaging/build_conda.sh index 98fc8b9183..93fd96cbca 100755 --- a/packaging/build_conda.sh +++ b/packaging/build_conda.sh @@ -10,4 +10,9 @@ setup_env export SOURCE_ROOT_DIR="$PWD" setup_conda_pytorch_constraint setup_visual_studio_constraint + +if [[ "$PYTHON_VERSION" == "3.11" ]]; then + export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c malfet" +fi + conda build $CONDA_CHANNEL_FLAGS --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchtext diff --git a/packaging/pkg_helpers.bash b/packaging/pkg_helpers.bash index ccdb4b612e..5c45e8937a 100644 --- a/packaging/pkg_helpers.bash +++ b/packaging/pkg_helpers.bash @@ -227,7 +227,7 @@ setup_conda_pytorch_constraint() { # TODO: Remove me later, see https://github.com/pytorch/pytorch/issues/62424 for more details if [[ "$(uname)" == Darwin ]]; then arch_name="$(uname -m)" - if [ "${arch_name}" != "arm64" ]; then + if [[ "${arch_name}" != "arm64" && "${PYTHON_VERSION}" != "3.11" ]]; then # Use less than equal to avoid version conflict in python=3.6 environment export CONDA_EXTRA_BUILD_CONSTRAINT="- mkl<=2021.2.0" fi