From 9035a1cb4d6fd927b04d8491cd0e8e073ee22025 Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Mon, 30 Aug 2021 13:55:19 -0700 Subject: [PATCH] .github: Adding configuration for docs_test (#64201) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/64201 Adds docs_test to our existing test matrix for github actions Signed-off-by: Eli Uriegas cc ezyang seemethere malfet walterddr lg20987 pytorch/pytorch-dev-infra Test Plan: Imported from OSS Reviewed By: malfet Differential Revision: D30646765 Pulled By: seemethere fbshipit-source-id: 946adae01ff1f1f7ebe626e408e161b77b19a011 --- .github/scripts/generate_ci_workflows.py | 2 ++ .github/scripts/generate_pytorch_test_matrix.py | 2 ++ .github/templates/linux_ci_workflow.yml.j2 | 2 +- .github/workflows/generated-linux-bionic-cuda10.2-py3.9-gcc7.yml | 2 +- .github/workflows/generated-linux-bionic-py3.8-gcc9-coverage.yml | 2 +- .github/workflows/generated-linux-xenial-cuda10.2-py3.6-gcc7.yml | 2 +- .github/workflows/generated-linux-xenial-cuda11.3-py3.6-gcc7.yml | 2 +- .github/workflows/generated-linux-xenial-py3.6-gcc5.4.yml | 2 +- .../generated-periodic-linux-xenial-cuda11.1-py3.6-gcc7.yml | 2 +- .jenkins/pytorch/test.sh | 6 ++++++ 10 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/scripts/generate_ci_workflows.py b/.github/scripts/generate_ci_workflows.py index f1819db..3ae6305 100755 --- a/.github/scripts/generate_ci_workflows.py +++ b/.github/scripts/generate_ci_workflows.py @@ -148,6 +148,7 @@ class CIWorkflow: enable_nogpu_no_avx_test: YamlShellBool = "''" enable_nogpu_no_avx2_test: YamlShellBool = "''" enable_slow_test: YamlShellBool = "''" + enable_docs_test: YamlShellBool = "''" def __post_init__(self) -> None: if self.is_libtorch: @@ -266,6 +267,7 @@ LINUX_WORKFLOWS = [ test_runner_type=LINUX_CPU_TEST_RUNNER, on_pull_request=True, enable_doc_jobs=True, + enable_docs_test=1, num_test_shards=2, ciflow_config=CIFlowConfig( enabled=True, diff --git a/.github/scripts/generate_pytorch_test_matrix.py b/.github/scripts/generate_pytorch_test_matrix.py index 75df57c..7dc2909 100755 --- a/.github/scripts/generate_pytorch_test_matrix.py +++ b/.github/scripts/generate_pytorch_test_matrix.py @@ -55,6 +55,8 @@ def main() -> None: configs['distributed'] = {'num_shards': 1, 'runner': TEST_RUNNER_TYPE} if os.getenv('ENABLE_SLOW_TEST'): configs['slow'] = {'num_shards': 1, 'runner': TEST_RUNNER_TYPE} + if os.getenv('ENABLE_DOCS_TEST'): + configs['docs_test'] = {'num_shards': 1, 'runner': TEST_RUNNER_TYPE} matrix = { 'include': [ { diff --git a/.github/templates/linux_ci_workflow.yml.j2 b/.github/templates/linux_ci_workflow.yml.j2 index 7d90207..e7681b0 100644 --- a/.github/templates/linux_ci_workflow.yml.j2 +++ b/.github/templates/linux_ci_workflow.yml.j2 @@ -254,6 +254,7 @@ jobs: ENABLE_NOGPU_NO_AVX_TEST: !{{ enable_nogpu_no_avx_test }} ENABLE_NOGPU_NO_AVX2_TEST: !{{ enable_nogpu_no_avx2_test }} ENABLE_SLOW_TEST: !{{ enable_slow_test }} + ENABLE_DOCS_TEST: !{{ enable_docs_test }} NUM_TEST_SHARDS: !{{ num_test_shards }} MULTIGPU_RUNNER_TYPE: linux.16xlarge.nvidia.gpu NOGPU_RUNNER_TYPE: linux.2xlarge @@ -346,7 +347,6 @@ jobs: env | grep '^GITHUB' > "/tmp/github_env_${GITHUB_RUN_ID}" - name: Test PyTorch env: - BUILD_ENVIRONMENT: !{{ build_environment }}-${{ matrix.config }} PR_NUMBER: ${{ github.event.pull_request.number }} run: | if [[ $TEST_CONFIG == 'multigpu' ]]; then diff --git a/.github/workflows/generated-linux-bionic-cuda10.2-py3.9-gcc7.yml b/.github/workflows/generated-linux-bionic-cuda10.2-py3.9-gcc7.yml index c51f8f0..0c50961 100644 --- a/.github/workflows/generated-linux-bionic-cuda10.2-py3.9-gcc7.yml +++ b/.github/workflows/generated-linux-bionic-cuda10.2-py3.9-gcc7.yml @@ -230,6 +230,7 @@ jobs: ENABLE_NOGPU_NO_AVX_TEST: '' ENABLE_NOGPU_NO_AVX2_TEST: '' ENABLE_SLOW_TEST: '' + ENABLE_DOCS_TEST: '' NUM_TEST_SHARDS: 2 MULTIGPU_RUNNER_TYPE: linux.16xlarge.nvidia.gpu NOGPU_RUNNER_TYPE: linux.2xlarge @@ -325,7 +326,6 @@ jobs: env | grep '^GITHUB' > "/tmp/github_env_${GITHUB_RUN_ID}" - name: Test PyTorch env: - BUILD_ENVIRONMENT: linux-bionic-cuda10.2-py3.9-gcc7-${{ matrix.config }} PR_NUMBER: ${{ github.event.pull_request.number }} run: | if [[ $TEST_CONFIG == 'multigpu' ]]; then diff --git a/.github/workflows/generated-linux-bionic-py3.8-gcc9-coverage.yml b/.github/workflows/generated-linux-bionic-py3.8-gcc9-coverage.yml index 014b1d1..536274b 100644 --- a/.github/workflows/generated-linux-bionic-py3.8-gcc9-coverage.yml +++ b/.github/workflows/generated-linux-bionic-py3.8-gcc9-coverage.yml @@ -230,6 +230,7 @@ jobs: ENABLE_NOGPU_NO_AVX_TEST: '' ENABLE_NOGPU_NO_AVX2_TEST: '' ENABLE_SLOW_TEST: '' + ENABLE_DOCS_TEST: '' NUM_TEST_SHARDS: 2 MULTIGPU_RUNNER_TYPE: linux.16xlarge.nvidia.gpu NOGPU_RUNNER_TYPE: linux.2xlarge @@ -325,7 +326,6 @@ jobs: env | grep '^GITHUB' > "/tmp/github_env_${GITHUB_RUN_ID}" - name: Test PyTorch env: - BUILD_ENVIRONMENT: linux-bionic-py3.8-gcc9-coverage-${{ matrix.config }} PR_NUMBER: ${{ github.event.pull_request.number }} run: | if [[ $TEST_CONFIG == 'multigpu' ]]; then diff --git a/.github/workflows/generated-linux-xenial-cuda10.2-py3.6-gcc7.yml b/.github/workflows/generated-linux-xenial-cuda10.2-py3.6-gcc7.yml index 76b973e..42d10cb 100644 --- a/.github/workflows/generated-linux-xenial-cuda10.2-py3.6-gcc7.yml +++ b/.github/workflows/generated-linux-xenial-cuda10.2-py3.6-gcc7.yml @@ -230,6 +230,7 @@ jobs: ENABLE_NOGPU_NO_AVX_TEST: 1 ENABLE_NOGPU_NO_AVX2_TEST: 1 ENABLE_SLOW_TEST: 1 + ENABLE_DOCS_TEST: '' NUM_TEST_SHARDS: 2 MULTIGPU_RUNNER_TYPE: linux.16xlarge.nvidia.gpu NOGPU_RUNNER_TYPE: linux.2xlarge @@ -325,7 +326,6 @@ jobs: env | grep '^GITHUB' > "/tmp/github_env_${GITHUB_RUN_ID}" - name: Test PyTorch env: - BUILD_ENVIRONMENT: linux-xenial-cuda10.2-py3.6-gcc7-${{ matrix.config }} PR_NUMBER: ${{ github.event.pull_request.number }} run: | if [[ $TEST_CONFIG == 'multigpu' ]]; then diff --git a/.github/workflows/generated-linux-xenial-cuda11.3-py3.6-gcc7.yml b/.github/workflows/generated-linux-xenial-cuda11.3-py3.6-gcc7.yml index 8114bd5..8c3b8d4 100644 --- a/.github/workflows/generated-linux-xenial-cuda11.3-py3.6-gcc7.yml +++ b/.github/workflows/generated-linux-xenial-cuda11.3-py3.6-gcc7.yml @@ -230,6 +230,7 @@ jobs: ENABLE_NOGPU_NO_AVX_TEST: '' ENABLE_NOGPU_NO_AVX2_TEST: '' ENABLE_SLOW_TEST: '' + ENABLE_DOCS_TEST: '' NUM_TEST_SHARDS: 2 MULTIGPU_RUNNER_TYPE: linux.16xlarge.nvidia.gpu NOGPU_RUNNER_TYPE: linux.2xlarge @@ -325,7 +326,6 @@ jobs: env | grep '^GITHUB' > "/tmp/github_env_${GITHUB_RUN_ID}" - name: Test PyTorch env: - BUILD_ENVIRONMENT: linux-xenial-cuda11.3-py3.6-gcc7-${{ matrix.config }} PR_NUMBER: ${{ github.event.pull_request.number }} run: | if [[ $TEST_CONFIG == 'multigpu' ]]; then diff --git a/.github/workflows/generated-linux-xenial-py3.6-gcc5.4.yml b/.github/workflows/generated-linux-xenial-py3.6-gcc5.4.yml index 6cc391b..cbbfa59 100644 --- a/.github/workflows/generated-linux-xenial-py3.6-gcc5.4.yml +++ b/.github/workflows/generated-linux-xenial-py3.6-gcc5.4.yml @@ -230,6 +230,7 @@ jobs: ENABLE_NOGPU_NO_AVX_TEST: '' ENABLE_NOGPU_NO_AVX2_TEST: '' ENABLE_SLOW_TEST: '' + ENABLE_DOCS_TEST: 1 NUM_TEST_SHARDS: 2 MULTIGPU_RUNNER_TYPE: linux.16xlarge.nvidia.gpu NOGPU_RUNNER_TYPE: linux.2xlarge @@ -325,7 +326,6 @@ jobs: env | grep '^GITHUB' > "/tmp/github_env_${GITHUB_RUN_ID}" - name: Test PyTorch env: - BUILD_ENVIRONMENT: linux-xenial-py3.6-gcc5.4-${{ matrix.config }} PR_NUMBER: ${{ github.event.pull_request.number }} run: | if [[ $TEST_CONFIG == 'multigpu' ]]; then diff --git a/.github/workflows/generated-periodic-linux-xenial-cuda11.1-py3.6-gcc7.yml b/.github/workflows/generated-periodic-linux-xenial-cuda11.1-py3.6-gcc7.yml index 7b94779..fc43fa7 100644 --- a/.github/workflows/generated-periodic-linux-xenial-cuda11.1-py3.6-gcc7.yml +++ b/.github/workflows/generated-periodic-linux-xenial-cuda11.1-py3.6-gcc7.yml @@ -228,6 +228,7 @@ jobs: ENABLE_NOGPU_NO_AVX_TEST: '' ENABLE_NOGPU_NO_AVX2_TEST: '' ENABLE_SLOW_TEST: '' + ENABLE_DOCS_TEST: '' NUM_TEST_SHARDS: 2 MULTIGPU_RUNNER_TYPE: linux.16xlarge.nvidia.gpu NOGPU_RUNNER_TYPE: linux.2xlarge @@ -323,7 +324,6 @@ jobs: env | grep '^GITHUB' > "/tmp/github_env_${GITHUB_RUN_ID}" - name: Test PyTorch env: - BUILD_ENVIRONMENT: periodic-linux-xenial-cuda11.1-py3.6-gcc7-${{ matrix.config }} PR_NUMBER: ${{ github.event.pull_request.number }} run: | if [[ $TEST_CONFIG == 'multigpu' ]]; then diff --git a/.jenkins/pytorch/test.sh b/.jenkins/pytorch/test.sh index 5014f60..9710d3a 100755 --- a/.jenkins/pytorch/test.sh +++ b/.jenkins/pytorch/test.sh @@ -494,6 +494,10 @@ test_torch_deploy() { assert_git_not_dirty } +test_docs_test() { + .jenkins/pytorch/docs-test.sh +} + if ! [[ "${BUILD_ENVIRONMENT}" == *libtorch* || "${BUILD_ENVIRONMENT}" == *-bazel-* ]]; then (cd test && python -c "import torch; print(torch.__config__.show())") (cd test && python -c "import torch; print(torch.__config__.parallel_info())") @@ -532,6 +536,8 @@ elif [[ "${BUILD_ENVIRONMENT}" == *-bazel-* ]]; then elif [[ "${BUILD_ENVIRONMENT}" == *distributed* ]]; then test_distributed test_rpc +elif [[ "${TEST_CONFIG}" = docs_test ]]; then + test_docs_test else install_torchvision install_monkeytype -- 2.7.4