diff --git a/.circleci/build_docs/commit_docs.sh b/.circleci/build_docs/commit_docs.sh index b923b0edbc4..04e3538fefc 100755 --- a/.circleci/build_docs/commit_docs.sh +++ b/.circleci/build_docs/commit_docs.sh @@ -6,7 +6,7 @@ set -ex if [ "$2" == "" ]; then echo call as "$0" "" "" echo where src is the root of the built documentation git checkout and - echo branch should be "master" or "1.7" or so + echo branch should be "main" or "1.7" or so exit 1 fi @@ -20,7 +20,7 @@ git checkout gh-pages mkdir -p ./"${target}" rm -rf ./"${target}"/* cp -r "${src}/docs/build/html/"* ./"$target" -if [ "${target}" == "master" ]; then +if [ "${target}" == "main" ]; then mkdir -p ./_static rm -rf ./_static/* cp -r "${src}/docs/build/html/_static/"* ./_static diff --git a/.circleci/config.yml b/.circleci/config.yml index 03f47e473ce..66c16edfe3e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,7 +29,7 @@ commands: # command: | # set -ex # BRANCH=$(git rev-parse --abbrev-ref HEAD) -# if [[ "$BRANCH" != "master" ]]; then +# if [[ "$BRANCH" != "main" ]]; then # git fetch --force origin ${CIRCLE_BRANCH}/merge:merged/${CIRCLE_BRANCH} # git checkout "merged/$CIRCLE_BRANCH" # fi @@ -936,7 +936,7 @@ jobs: command: | set -ex tag=${CIRCLE_TAG:1:5} - VERSION=${tag:-master} + VERSION=${tag:-main} eval "$(./conda/bin/conda shell.bash hook)" conda activate ./env pushd docs @@ -982,7 +982,7 @@ jobs: # https://circleci.com/docs/2.0/configuration-reference/#checkout set -ex tag=${CIRCLE_TAG:1:5} - target=${tag:-master} + target=${tag:-main} ~/workspace/.circleci/build_docs/commit_docs.sh ~/workspace $target @@ -1159,7 +1159,7 @@ workflows: cu_version: cpu filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_wheel_py3.6_cpu @@ -1168,7 +1168,7 @@ workflows: cu_version: cu102 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_wheel_py3.6_cu102 @@ -1177,7 +1177,7 @@ workflows: cu_version: cu111 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_wheel_py3.6_cu111 @@ -1186,7 +1186,7 @@ workflows: cu_version: cu113 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_wheel_py3.6_cu113 @@ -1195,7 +1195,7 @@ workflows: cu_version: cpu filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_wheel_py3.7_cpu @@ -1204,7 +1204,7 @@ workflows: cu_version: cu102 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_wheel_py3.7_cu102 @@ -1213,7 +1213,7 @@ workflows: cu_version: cu111 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_wheel_py3.7_cu111 @@ -1222,7 +1222,7 @@ workflows: cu_version: cu113 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_wheel_py3.7_cu113 @@ -1231,7 +1231,7 @@ workflows: cu_version: cpu filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_wheel_py3.8_cpu @@ -1240,7 +1240,7 @@ workflows: cu_version: cu102 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_wheel_py3.8_cu102 @@ -1249,7 +1249,7 @@ workflows: cu_version: cu111 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_wheel_py3.8_cu111 @@ -1258,7 +1258,7 @@ workflows: cu_version: cu113 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_wheel_py3.8_cu113 @@ -1271,7 +1271,7 @@ workflows: cu_version: cu102 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_wheel_py3.9_cu102 @@ -1280,7 +1280,7 @@ workflows: cu_version: cu111 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_wheel_py3.9_cu111 @@ -1413,7 +1413,7 @@ workflows: cu_version: cpu filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_conda_py3.6_cpu @@ -1422,7 +1422,7 @@ workflows: cu_version: cu102 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_conda_py3.6_cu102 @@ -1431,7 +1431,7 @@ workflows: cu_version: cu111 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_conda_py3.6_cu111 @@ -1440,7 +1440,7 @@ workflows: cu_version: cu113 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_conda_py3.6_cu113 @@ -1449,7 +1449,7 @@ workflows: cu_version: cpu filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_conda_py3.7_cpu @@ -1458,7 +1458,7 @@ workflows: cu_version: cu102 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_conda_py3.7_cu102 @@ -1467,7 +1467,7 @@ workflows: cu_version: cu111 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_conda_py3.7_cu111 @@ -1476,7 +1476,7 @@ workflows: cu_version: cu113 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_conda_py3.7_cu113 @@ -1485,7 +1485,7 @@ workflows: cu_version: cpu filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_conda_py3.8_cpu @@ -1494,7 +1494,7 @@ workflows: cu_version: cu102 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_conda_py3.8_cu102 @@ -1503,7 +1503,7 @@ workflows: cu_version: cu111 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_conda_py3.8_cu111 @@ -1512,7 +1512,7 @@ workflows: cu_version: cu113 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_conda_py3.8_cu113 @@ -1525,7 +1525,7 @@ workflows: cu_version: cu102 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_conda_py3.9_cu102 @@ -1534,7 +1534,7 @@ workflows: cu_version: cu111 filters: branches: - only: master + only: main tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_conda_py3.9_cu111 @@ -1609,7 +1609,7 @@ workflows: filters: branches: only: - - master + - main - nightly name: unittest_linux_gpu_py3.6 python_version: '3.6' @@ -1618,7 +1618,7 @@ workflows: filters: branches: only: - - master + - main - nightly name: unittest_linux_gpu_py3.7 python_version: '3.7' @@ -1631,7 +1631,7 @@ workflows: filters: branches: only: - - master + - main - nightly name: unittest_linux_gpu_py3.9 python_version: '3.9' @@ -1656,7 +1656,7 @@ workflows: filters: branches: only: - - master + - main - nightly name: unittest_windows_gpu_py3.6 python_version: '3.6' @@ -1665,7 +1665,7 @@ workflows: filters: branches: only: - - master + - main - nightly name: unittest_windows_gpu_py3.7 python_version: '3.7' @@ -1678,7 +1678,7 @@ workflows: filters: branches: only: - - master + - main - nightly name: unittest_windows_gpu_py3.9 python_version: '3.9' @@ -4075,7 +4075,7 @@ workflows: filters: branches: only: - - master + - main jobs: - smoke_test_docker_image_build: context: org-member diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index 15cb7eb6a07..980332d3ea9 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -29,7 +29,7 @@ commands: # command: | # set -ex # BRANCH=$(git rev-parse --abbrev-ref HEAD) -# if [[ "$BRANCH" != "master" ]]; then +# if [[ "$BRANCH" != "main" ]]; then # git fetch --force origin ${CIRCLE_BRANCH}/merge:merged/${CIRCLE_BRANCH} # git checkout "merged/$CIRCLE_BRANCH" # fi @@ -936,7 +936,7 @@ jobs: command: | set -ex tag=${CIRCLE_TAG:1:5} - VERSION=${tag:-master} + VERSION=${tag:-main} eval "$(./conda/bin/conda shell.bash hook)" conda activate ./env pushd docs @@ -982,7 +982,7 @@ jobs: # https://circleci.com/docs/2.0/configuration-reference/#checkout set -ex tag=${CIRCLE_TAG:1:5} - target=${tag:-master} + target=${tag:-main} ~/workspace/.circleci/build_docs/commit_docs.sh ~/workspace $target @@ -1029,7 +1029,7 @@ workflows: filters: branches: only: - - master + - main jobs: - smoke_test_docker_image_build: context: org-member diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index 157cabca433..7e2fa25cb9d 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -44,7 +44,7 @@ def build_workflows(prefix='', filter_branch=None, upload=False, indentation=6, if windows_latest_only and os_type == "win" and filter_branch is None and \ (python_version != python_versions[-1] or (cu_version not in [cu_versions[0], cu_versions[-1]])): - fb = "master" + fb = "main" if not fb and (os_type == 'linux' and cu_version == 'cpu' and btype == 'wheel' and @@ -241,7 +241,7 @@ def unittest_workflows(indentation=6): if device_type == 'gpu': if python_version != "3.8": - job['filters'] = gen_filter_branch_tree('master', 'nightly') + job['filters'] = gen_filter_branch_tree('main', 'nightly') job['cu_version'] = 'cu102' else: job['cu_version'] = 'cpu' diff --git a/.github/workflows/bandit.yml b/.github/workflows/bandit.yml index 93bae80f9bd..84200b438a9 100644 --- a/.github/workflows/bandit.yml +++ b/.github/workflows/bandit.yml @@ -4,7 +4,7 @@ name: Bandit on: pull_request: - branches: [ master ] + branches: [ main ] workflow_dispatch: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 3c8bc96a5bd..99460b11228 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -4,7 +4,7 @@ name: CodeQL on: pull_request: - branches: [ master ] + branches: [ main ] workflow_dispatch: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 75405c94a83..55880ae5d70 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -60,7 +60,7 @@ conda install libpng jpeg If you plan to modify the code or documentation, please follow the steps below: -1. Fork the repository and create your branch from `master`. +1. Fork the repository and create your branch from `main`. 2. If you have modified the code (new feature or bug-fix), please add unit tests. 3. If you have changed APIs, update the documentation. Make sure the documentation builds. 4. Ensure the test suite passes. diff --git a/README.rst b/README.rst index 2c6daee4cc2..35cef0c19df 100644 --- a/README.rst +++ b/README.rst @@ -21,7 +21,7 @@ supported Python versions. +--------------------------+--------------------------+---------------------------------+ | ``torch`` | ``torchvision`` | ``python`` | +==========================+==========================+=================================+ -| ``master`` / ``nightly`` | ``master`` / ``nightly`` | ``>=3.6`` | +| ``master`` / ``nightly`` | ``main`` / ``nightly`` | ``>=3.6`` | +--------------------------+--------------------------+---------------------------------+ | ``1.9.0`` | ``0.10.0`` | ``>=3.6`` | +--------------------------+--------------------------+---------------------------------+ @@ -76,7 +76,7 @@ From source: In case building TorchVision from source fails, install the nightly version of PyTorch following -the linked guide on the `contributing page `_ and retry the install. +the linked guide on the `contributing page `_ and retry the install. By default, GPU support is built if CUDA is found and ``torch.cuda.is_available()`` is true. It's possible to force building GPU support by setting ``FORCE_CUDA=1`` environment variable, diff --git a/android/gradle.properties b/android/gradle.properties index a8105544f30..9c5b8f61212 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -9,7 +9,7 @@ POM_SCM_URL=https://github.com/pytorch/vision.git POM_SCM_CONNECTION=scm:git:https://github.com/pytorch/vision POM_SCM_DEV_CONNECTION=scm:git:git@github.com:pytorch/vision.git POM_LICENSE_NAME=BSD 3-Clause -POM_LICENSE_URL=https://github.com/pytorch/vision/blob/master/LICENSE +POM_LICENSE_URL=https://github.com/pytorch/vision/blob/main/LICENSE POM_ISSUES_URL=https://github.com/pytorch/vision/issues POM_LICENSE_DIST=repo POM_DEVELOPER_ID=pytorch diff --git a/docs/source/conf.py b/docs/source/conf.py index 6bbb05c13c7..e8e17edf283 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -82,10 +82,10 @@ # # The short X.Y version. # TODO: change to [:2] at v1.0 -version = 'master (' + torchvision.__version__ + ' )' +version = 'main (' + torchvision.__version__ + ' )' # The full version, including alpha/beta/rc tags. # TODO: verify this works as expected -release = 'master' +release = 'main' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/test/test_cpp_models.py b/test/test_cpp_models.py index 6deb5d79739..2307051ff60 100644 --- a/test/test_cpp_models.py +++ b/test/test_cpp_models.py @@ -45,7 +45,7 @@ def read_image2(): @unittest.skipIf( sys.platform == "darwin" or True, - "C++ models are broken on OS X at the moment, and there's a BC breakage on master; " + "C++ models are broken on OS X at the moment, and there's a BC breakage on main; " "see https://github.com/pytorch/vision/issues/1191") class Tester(unittest.TestCase): pretrained = False diff --git a/torchvision/__init__.py b/torchvision/__init__.py index 3cbdda7af7f..a5a6f568151 100644 --- a/torchvision/__init__.py +++ b/torchvision/__init__.py @@ -66,7 +66,7 @@ def set_video_backend(backend): It generally decodes faster than :mod:`pyav`, but is perhaps less robust. .. note:: - Building with FFMPEG is disabled by default in the latest master. If you want to use the 'video_reader' + Building with FFMPEG is disabled by default in the latest `main`. If you want to use the 'video_reader' backend, please compile torchvision from source. """ global _video_backend