From 375ab5386120010d222be5c60e248ce9b7ea6a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Fri, 21 Oct 2022 20:01:39 +0200 Subject: [PATCH] Migrate TPU tests to GitHub actions (#14687) * Migrate TPU tests to GitHub actions * No working dir * Keep _target * Dont skip draft * CHECK_SLEEP * Not yet * Remove recurrent cleanup script * Set secrets * a step cannot have both the `uses` and `run` keys * Version $PYTHON_VER was not found in the local cache * can't load package ... ($GOPATH not set) * The `set-env` command is disabled * Try updating go * Match timeout * simplify path * More cleanup * Install coverage. Unmark draft * Update .github/workflows/ci-pytorch-test-tpu.yml * DEBUG echo * Revert "DEBUG echo" This reverts commit 4011856e6ea076e45fe40b942c20ee63ed7433f3. * More debug * SSH * Im stupid * Remove always() * Forgot some Co-authored-by: Jirka Borovec Co-authored-by: Luca Antiga --- .circleci/config.yml | 150 ----------------------- .github/CODEOWNERS | 1 - .github/checkgroup.yml | 15 ++- .github/workflows/README.md | 2 +- .github/workflows/ci-circleci.yml | 36 ------ .github/workflows/ci-pytorch-dockers.yml | 2 +- .github/workflows/events-recurrent.yml | 43 ------- .github/workflows/tpu-tests.yml | 119 ++++++++++++++++++ .lightningignore | 1 - README.md | 31 ++--- dockers/tpu-tests/tpu_test_cases.jsonnet | 4 +- docs/README.md | 3 +- src/pytorch_lightning/README.md | 31 ++--- 13 files changed, 152 insertions(+), 286 deletions(-) delete mode 100644 .circleci/config.yml delete mode 100644 .github/workflows/ci-circleci.yml delete mode 100644 .github/workflows/events-recurrent.yml create mode 100644 .github/workflows/tpu-tests.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 2186abb290807..0000000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,150 +0,0 @@ -# Python CircleCI 2.1 configuration file. -version: 2.1 -orbs: - gcp-gke: circleci/gcp-gke@1.4.0 - go: circleci/go@1.7.1 - codecov: codecov/codecov@1.1.0 -parameters: - GHA_Actor: - type: string - default: "" - GHA_Action: - type: string - default: "" - GHA_Event: - type: string - default: "" - GHA_Meta: - type: string - default: "" - -references: - - make_docs: &make_docs - run: - name: Make Documentation - command: | - # the image uses python 2.7 by default, force a different version - pyenv global 3.7.3 - python --version - pip install -e . -r requirements/pytorch/docs.txt - pip list - cd docs - make clean - make html --jobs 2 SPHINXOPTS="-W" - - checkout_ml_testing: &checkout_ml_testing - run: - name: Checkout ml-testing-accelerators - command: | - git clone https://github.com/GoogleCloudPlatform/ml-testing-accelerators.git - cd ml-testing-accelerators - git fetch origin 5e88ac24f631c27045e62f0e8d5dfcf34e425e25:stable - git checkout stable - cd .. - - install_jsonnet: &install_jsonnet - run: - name: Install jsonnet - command: | - go install github.com/google/go-jsonnet/cmd/jsonnet@latest - - update_jsonnet: &update_jsonnet - run: - name: Update jsonnet - environment: - PR_NUMBER: << pipeline.parameters.GHA_Meta >> - command: | - export SHA=$(git rev-parse --short HEAD) - python -c "fname = 'dockers/tpu-tests/tpu_test_cases.jsonnet' ; data = open(fname).read().replace('{PYTORCH_VERSION}', '$XLA_VER') - data = data.replace('{PYTHON_VERSION}', '$PYTHON_VER').replace('{PR_NUMBER}', '$PR_NUMBER').replace('{SHA}', '$SHA') ; open(fname, 'w').write(data)" - cat dockers/tpu-tests/tpu_test_cases.jsonnet - - deploy_cluster: &deploy_cluster - run: - name: Deploy the job on the kubernetes cluster - command: | - export PATH=$PATH:$HOME/go/bin - job_name=$(jsonnet -J ml-testing-accelerators/ dockers/tpu-tests/tpu_test_cases.jsonnet | kubectl create -f -) && \ - job_name=${job_name#job.batch/} - job_name=${job_name% created} - pod_name=$(kubectl get po -l controller-uid=`kubectl get job $job_name -o "jsonpath={.metadata.labels.controller-uid}"` | awk 'match($0,!/NAME/) {print $1}') - echo "GKE pod name: $pod_name" - echo "Waiting on kubernetes job: $job_name" - i=0 && \ - # N checks spaced 30s apart = 900s total. - status_code=2 && \ - # Check on the job periodically. Set the status code depending on what - # happened to the job in Kubernetes. If we try MAX_CHECKS times and - # still the job hasn't finished, give up and return the starting - # non-zero status code. - printf "Waiting for job to finish: " && \ - while [ $i -lt $MAX_CHECKS ]; do ((i++)); if kubectl get jobs $job_name -o jsonpath='Failed:{.status.failed}' | grep "Failed:1"; then status_code=1 && break; elif kubectl get jobs $job_name -o jsonpath='Succeeded:{.status.succeeded}' | grep "Succeeded:1" ; then status_code=0 && break; else printf "."; fi; sleep $CHECK_SLEEP; done && \ - echo "Done waiting. Job status code: $status_code" && \ - kubectl logs -f $pod_name --container=train > /tmp/full_output.txt - if grep -q '' /tmp/full_output.txt ; then csplit /tmp/full_output.txt '//'; else mv /tmp/full_output.txt xx00; fi && \ - # First portion is the test logs. Print these to Github Action stdout. - cat xx00 && \ - echo "Done with log retrieval attempt." && \ - exit $status_code - - stats: &stats - run: - name: Statistics - command: | - mv ./xx01 coverage.xml - -jobs: - - TPU-tests: - docker: - - image: circleci/python:3.7 - environment: - - XLA_VER: 1.12 - - PYTHON_VER: 3.7 - - MAX_CHECKS: 1000 - - CHECK_SLEEP: 5 - steps: - - checkout - - go/install - - *checkout_ml_testing - - gcp-gke/install - - gcp-gke/update-kubeconfig-with-credentials: - cluster: $GKE_CLUSTER - perform-login: true - - *install_jsonnet - - *update_jsonnet - - *deploy_cluster - - *stats - - codecov/upload: - file: coverage.xml - flags: tpu,pytest - upload_name: TPU-coverage - - - store_artifacts: - path: coverage.xml - - build-Docs: - docker: - - image: readthedocs/build:latest - steps: - - checkout - - run: - command: | - git submodule update --init --recursive - name: Init git submodule - - *make_docs - - store_artifacts: - # allows us to preview the generated html pages - path: docs/build/html/ - destination: html - -workflows: - #build-docs: # FixMe - # when: << pipeline.parameters.GHA_Action >> - # jobs: - # - build-Docs - test-on-tpus: - when: << pipeline.parameters.GHA_Action >> - jobs: - - TPU-tests diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 826c90ec92a32..eedf30cf229a5 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -9,7 +9,6 @@ # CI/CD and configs /.github/ @borda @carmocca @akihironitta @otaj -/.circleci/ @borda @carmocca @akihironitta @otaj /.azure/ @borda @carmocca @akihironitta @otaj /dockers/ @borda @carmocca @akihironitta @otaj *.yml @borda @carmocca @akihironitta @otaj diff --git a/.github/checkgroup.yml b/.github/checkgroup.yml index 590ecc80160d5..ff60561486358 100644 --- a/.github/checkgroup.yml +++ b/.github/checkgroup.yml @@ -6,13 +6,6 @@ subprojects: # SECTION: pytorch_lightning - - id: "CI: CircleCI" - paths: - - ".circleci/**" - - ".github/workflows/ci-circleci.yml" - checks: - - "test-on-tpus" - - id: "pytorch_lightning" paths: # all examples don't need to be added because they aren't used in CI, but these are @@ -58,7 +51,7 @@ subprojects: - "pl-slow (macOS-11, 3.7, 1.11)" - "pl-slow (ubuntu-20.04, 3.7, 1.11)" - "pl-slow (windows-2022, 3.7, 1.11)" - # TODO: since this job cannot run on forks, it cannot be required or it will block all PL PRs from forks + # TODO: since this job has intermittent availability, it cannot be required or it will block all PL PRs from forks #- "test-on-tpus" - id: "pytorch_lightning: CPU" @@ -110,6 +103,12 @@ subprojects: checks: - "pytorch-lightning (IPUs)" + - id: "pytorch-lightning: TPU" + paths: + - ".github/workflows/tpu-tests.yml" + checks: + - "test-on-tpus" + - id: "pytorch_lightning: Docs" paths: - "docs/source-pytorch/**" diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 6e7e6711cac27..e039559bdd71c 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -12,7 +12,7 @@ | pytorch-lightning (HPUs) | .azure-pipelines/hpu-tests.yml | Run only HPU-specific tests. | HPU | | pytorch-lightning (GPUs) | .azure-pipelines/gpu-tests-pytorch.yml | Run all CPU and GPU-specific tests, standalone, and examples. Each standalone test needs to be run in separate processes to avoid unwanted interactions between test cases. | GPU | | PyTorchLightning.Benchmark | .azure-pipelines/gpu-benchmark.yml | Run speed/memory benchmarks for parity with pure PyTorch. | GPU | -| test-on-tpus | .circleci/config.yml | Run only TPU-specific tests. | TPU | +| test-on-tpus | .github/workflows/tpu-tests.yml | Run only TPU-specific tests. | TPU | - \*Accelerators used in CI diff --git a/.github/workflows/ci-circleci.yml b/.github/workflows/ci-circleci.yml deleted file mode 100644 index f8bb16e371099..0000000000000 --- a/.github/workflows/ci-circleci.yml +++ /dev/null @@ -1,36 +0,0 @@ -on: - push: - branches: [master, "release/*"] - paths: - - ".github/workflows/ci-circleci.yml" - - ".circleci/config.yml" - - "requirements/pytorch/**" - - "src/pytorch_lightning/**" - - "tests/tests_pytorch/**" - - "setup.cfg" # includes pytest config - - ".actions/**" - # should use `pull_request_target` but it's blocked by - # https://github.com/CircleCI-Public/trigger-circleci-pipeline-action/issues/27 - # so this job will not run on forks until the above is fixed or we replace CircleCI for another provider - pull_request: - branches: [master, "release/*"] - paths: - - ".github/workflows/ci-circleci.yml" - - ".circleci/config.yml" - - "requirements/pytorch/**" - - "src/pytorch_lightning/**" - - "tests/tests_pytorch/**" - - "setup.cfg" # includes pytest config - - ".actions/**" - -jobs: - # https://github.com/marketplace/actions/trigger-circleci-pipeline - trigger-circleci: - runs-on: ubuntu-latest - if: ${{ github.repository == 'Lightning-AI/lightning' }} # skip for forks as secrets cannot be shared - steps: - - uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.0.5 - env: - CCI_TOKEN: ${{ secrets.CCI_TOKEN }} - with: - GHA_Meta: ${{ github.event.pull_request.number }} diff --git a/.github/workflows/ci-pytorch-dockers.yml b/.github/workflows/ci-pytorch-dockers.yml index 5f0d3a474292d..c161bd36f70d0 100644 --- a/.github/workflows/ci-pytorch-dockers.yml +++ b/.github/workflows/ci-pytorch-dockers.yml @@ -56,7 +56,7 @@ jobs: strategy: fail-fast: false matrix: - # the config used in '.circleci/config.yml`' + # the config used in '.github/workflows/tpu-tests.yml' python_version: ["3.7"] xla_version: ["1.12"] steps: diff --git a/.github/workflows/events-recurrent.yml b/.github/workflows/events-recurrent.yml deleted file mode 100644 index 1e9ece7068043..0000000000000 --- a/.github/workflows/events-recurrent.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Recurrent - -# https://jasonet.co/posts/scheduled-actions/ -# https://github.community/t/distinct-job-for-each-schedule/17811/2 -on: - push: - branches: [ master ] - schedule: - - cron: "*/20 * * * *" # At every 20 minutes - -env: - GKE_CLUSTER: lightning-cluster - GKE_ZONE: us-central1-a - -jobs: - tpu-cleanup: - name: TPU cleaning - if: ${{ github.repository == 'Lightning-AI/lightning' }} # skip for forks - runs-on: ubuntu-20.04 - - steps: - - name: Setup gcloud CLI - uses: google-github-actions/setup-gcloud@v0 - with: - version: '290.0.1' - service_account_key: ${{ secrets.GKE_SA_KEY_BASE64 }} - project_id: ${{ secrets.GKE_PROJECT }} - export_default_credentials: true - # Get the GKE credentials so we can deploy to the cluster; Use either zone or region depending on cluster setup. - - run: |- - gcloud container clusters get-credentials "$GKE_CLUSTER" --zone "$GKE_ZONE" - shell: bash - - - name: Clean all mong hanging jobs - run: | - # Match jobs whose age matches patterns like '1h' or '1d', i.e. any job - # that has been around longer than 1hr. First print all columns for - # matches, then execute the delete. - jobs_to_delete=$(kubectl get job | awk 'match($4,/[0-9]+[dh]/) {print $0}') - echo $jobs_to_delete - if [ ${#jobs_to_delete} -gt 1 ]; - then kubectl delete job $(kubectl get job | awk 'match($4,/[0-9]+[dh]/) {print $1}'); - fi diff --git a/.github/workflows/tpu-tests.yml b/.github/workflows/tpu-tests.yml new file mode 100644 index 0000000000000..41092eed8c401 --- /dev/null +++ b/.github/workflows/tpu-tests.yml @@ -0,0 +1,119 @@ +on: + push: + branches: [master, "release/*"] + paths: + - ".github/workflows/tpu-tests.yml" + - "requirements/pytorch/**" + - "src/pytorch_lightning/**" + - "tests/tests_pytorch/**" + - "setup.cfg" # includes pytest config + # TODO: use _target after merge to share secrets + pull_request: + branches: [master, "release/*"] + types: [opened, reopened, ready_for_review, synchronize] # add `ready_for_review` since draft is skipped + paths: + - ".github/workflows/tpu-tests.yml" + - "requirements/pytorch/**" + - "src/pytorch_lightning/**" + - "tests/tests_pytorch/**" + - "setup.cfg" # includes pytest config + - ".actions/**" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} + cancel-in-progress: ${{ ! (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }} + +env: + PROJECT_ID: ${{ secrets.GKE_PROJECT }} + GKE_CLUSTER: lightning-cluster + GKE_ZONE: us-central1-a + +jobs: + test-on-tpus: + runs-on: ubuntu-22.04 + if: github.event.pull_request.draft == false + env: + PYTHON_VER: 3.7 + timeout-minutes: 100 # should match the timeout in `tpu_test_cases.jsonnet` + + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - uses: actions/setup-python@v4 + with: + python-version: ${{ env.PYTHON_VER }} + + - name: Checkout ml-testing-accelerators + run: | + git clone https://github.com/GoogleCloudPlatform/ml-testing-accelerators.git + cd ml-testing-accelerators + git fetch origin 5e88ac24f631c27045e62f0e8d5dfcf34e425e25:stable + git checkout stable + + - uses: actions/setup-go@v3 + with: + go-version: '1.19' + + - name: Install jsonnet + run: go install github.com/google/go-jsonnet/cmd/jsonnet@latest + + - name: Update jsonnet + env: + XLA_VER: 1.12 + PR_NUMBER: ${{ github.event.pull_request.number }} + SHA: ${{ github.event.pull_request.head.sha }} + run: | + python -c "fname = 'dockers/tpu-tests/tpu_test_cases.jsonnet' ; data = open(fname).read().replace('{PYTORCH_VERSION}', '$XLA_VER') + data = data.replace('{PYTHON_VERSION}', '$PYTHON_VER').replace('{PR_NUMBER}', '$PR_NUMBER').replace('{SHA}', '$SHA') ; open(fname, 'w').write(data)" + cat dockers/tpu-tests/tpu_test_cases.jsonnet + shell: bash + + # https://docs.github.com/en/actions/deployment/deploying-to-your-cloud-provider/deploying-to-google-kubernetes-engine + - uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e + with: + cluster_name: ${{ env.GKE_CLUSTER }} + location: ${{ env.GKE_ZONE }} + credentials: ${{ secrets.GKE_SA_KEY_BASE64 }} + + - name: Deploy cluster + run: | + export PATH=$PATH:$HOME/go/bin + job_name=$(jsonnet -J ml-testing-accelerators/ dockers/tpu-tests/tpu_test_cases.jsonnet | kubectl create -f -) + job_name=${job_name#job.batch/} + job_name=${job_name% created} + pod_name=$(kubectl get po -l controller-uid=`kubectl get job $job_name -o "jsonpath={.metadata.labels.controller-uid}"` | awk 'match($0,!/NAME/) {print $1}') + echo "GKE pod name: $pod_name" + echo "Waiting on kubernetes job: $job_name" + status_code=2 && + # Check on the job periodically. Set the status code depending on what happened to the job in Kubernetes. + printf "Waiting for job to finish: " + while true; do + if kubectl get jobs $job_name -o jsonpath='Failed:{.status.failed}' | grep "Failed:1"; then + status_code=1 && break; + elif kubectl get jobs $job_name -o jsonpath='Succeeded:{.status.succeeded}' | grep "Succeeded:1"; then + status_code=0 && break; + else + printf "."; + fi; + sleep 5; + done + echo "Done waiting. Job status code: $status_code" + kubectl logs -f $pod_name --container=train > /tmp/full_output.txt + grep '' /tmp/full_output.txt # sanity check + csplit /tmp/full_output.txt '//' + mv xx01 coverage.xml + exit $status_code + shell: bash + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + # see: https://github.com/actions/toolkit/issues/399 + continue-on-error: true + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: coverage.xml + flags: tpu,pytest,python${{ env.PYTHON_VER }} + name: TPU-coverage + fail_ci_if_error: false diff --git a/.lightningignore b/.lightningignore index f3bdf641c1425..4ce8d526e30e3 100644 --- a/.lightningignore +++ b/.lightningignore @@ -1,6 +1,5 @@ _notebooks .azure -.circleci .github .ipynb_checkpoints .pytest_cache diff --git a/README.md b/README.md index 73c69c4c486b0..0613f102b7dde 100644 --- a/README.md +++ b/README.md @@ -89,17 +89,15 @@ Lightning is rigorously tested across multiple CPUs, GPUs, TPUs, IPUs, and HPUs
-| System / PyTorch ver. | 1.9 | 1.10 | 1.12 (latest) | -| :------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -| Linux py3.7 \[GPUs\*\*\] | - | - | - | -| Linux py3.7 \[TPUs\*\*\*\] | [![CircleCI](https://circleci.com/gh/Lightning-AI/lightning/tree/master.svg?style=svg)](https://circleci.com/gh/Lightning-AI/lightning/tree/master) | - | - | -| Linux py3.8 \[IPUs\] | [![Build Status]()](https://dev.azure.com/Lightning-AI/lightning/_build/latest?definitionId=25&branchName=master) | - | - | -| Linux py3.8 \[HPUs\] | - | [![Build Status]()](https://dev.azure.com/Lightning-AI/lightning/_build/latest?definitionId=26&branchName=master) | - | -| Linux py3.8 (with Conda) | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-conda.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-conda.yml) | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-conda.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-conda.yml) | - | -| Linux py3.9 (with Conda) | - | - | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-conda.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-conda.yml) | -| Linux py3.{7,9} | - | - | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml) | -| OSX py3.{7,9} | - | - | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml) | -| Windows py3.{7,9} | - | - | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml) | +| System / PyTorch ver. | 1.9 | 1.10 | 1.12 (latest) | +| :------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +| Linux py3.7 \[GPUs\*\*\] | - | - | - | +| Linux py3.7 \[TPUs\*\*\*\] | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/tpu-tests.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/tpu-tests.yml) | - | - | +| Linux py3.8 \[IPUs\] | [![Build Status]()](https://dev.azure.com/Lightning-AI/lightning/_build/latest?definitionId=25&branchName=master) | - | - | +| Linux py3.8 \[HPUs\] | - | [![Build Status]()](https://dev.azure.com/Lightning-AI/lightning/_build/latest?definitionId=26&branchName=master) | - | +| Linux py3.{7,9} | - | - | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml) | +| OSX py3.{7,9} | - | - | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml) | +| Windows py3.{7,9} | - | - | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml) | - _\*\* tests run on two NVIDIA P100_ - _\*\*\* tests run on Google GKE TPUv2/3. TPU py3.7 means we support Colab and Kaggle env._ @@ -137,14 +135,7 @@ pip install pytorch-lightning['extra'] conda install pytorch-lightning -c conda-forge ``` -#### Install stable 1.7.x - -The actual status of 1.7 \[stable\] is the following: - -[![Test PyTorch full](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml/badge.svg?branch=release%2Fpytorch&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml?query=branch%3Arelease%2Fpytorch) -[![Test PyTorch with Conda](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-conda.yml/badge.svg?branch=release%2Fpytorch&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-conda.yml?query=branch%3Arelease%2Fpytorch) -[![TPU tests](https://dl.circleci.com/status-badge/img/gh/Lightning-AI/lightning/tree/release%2Fpytorch.svg?style=shield)](https://dl.circleci.com/status-badge/redirect/gh/Lightning-AI/lightning/tree/release%2Fpytorch) -[![Check Docs](https://github.com/Lightning-AI/lightning/actions/workflows/docs-checks.yml/badge.svg?branch=release%2Fpytorch&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/docs-checks.yml?query=branch%3Arelease%2Fpytorch) +#### Install stable version Install future release from the source @@ -152,7 +143,7 @@ Install future release from the source pip install https://github.com/Lightning-AI/lightning/archive/refs/heads/release/stable.zip -U ``` -#### Install bleeding-edge - future 1.6 +#### Install bleeding-edge Install nightly from the source (no guarantees) diff --git a/dockers/tpu-tests/tpu_test_cases.jsonnet b/dockers/tpu-tests/tpu_test_cases.jsonnet index 754904efd03c7..92f18e7b1f572 100644 --- a/dockers/tpu-tests/tpu_test_cases.jsonnet +++ b/dockers/tpu-tests/tpu_test_cases.jsonnet @@ -27,8 +27,8 @@ local tputests = base.BaseTest { conda activate lightning echo "--- Fetch the SHA's changes ---" - git clone --single-branch --depth 1 https://github.com/Lightning-AI/lightning.git /home/runner/work/lightning - cd home/runner/work/lightning + git clone --single-branch --depth 1 https://github.com/Lightning-AI/lightning.git + cd lightning git fetch origin --depth 1 pull/{PR_NUMBER}/head:test/{PR_NUMBER} git -c advice.detachedHead=false checkout {SHA} diff --git a/docs/README.md b/docs/README.md index 54f39a8b4fd0c..d59458b5a58ef 100644 --- a/docs/README.md +++ b/docs/README.md @@ -48,8 +48,7 @@ make docs and open `docs/build/html/index.html` in your browser. -When you send a PR the continuous integration will run tests and build the docs. You can access a preview of the html pages in the -_Artifacts_ tab in CircleCI when you click on the task named _build-Docs_ of _ci-tests_ at the bottom of the PR page. +When you send a PR the continuous integration will run tests and build the docs. Notes: diff --git a/src/pytorch_lightning/README.md b/src/pytorch_lightning/README.md index 27b8eef9cb270..93e0e68866de8 100644 --- a/src/pytorch_lightning/README.md +++ b/src/pytorch_lightning/README.md @@ -78,17 +78,15 @@ Lightning is rigorously tested across multiple CPUs, GPUs, TPUs, IPUs, and HPUs
-| System / PyTorch ver. | 1.9 | 1.10 | 1.12 (latest) | -| :------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -| Linux py3.7 \[GPUs\*\*\] | - | - | - | -| Linux py3.7 \[TPUs\*\*\*\] | [![CircleCI](https://circleci.com/gh/Lightning-AI/lightning/tree/master.svg?style=svg)](https://circleci.com/gh/Lightning-AI/lightning/tree/master) | - | - | -| Linux py3.8 \[IPUs\] | [![Build Status]()](https://dev.azure.com/Lightning-AI/lightning/_build/latest?definitionId=25&branchName=master) | - | - | -| Linux py3.8 \[HPUs\] | - | [![Build Status]()](https://dev.azure.com/Lightning-AI/lightning/_build/latest?definitionId=26&branchName=master) | - | -| Linux py3.8 (with Conda) | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-conda.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-conda.yml) | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-conda.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-conda.yml) | - | -| Linux py3.9 (with Conda) | - | - | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-conda.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-conda.yml) | -| Linux py3.{7,9} | - | - | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml) | -| OSX py3.{7,9} | - | - | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml) | -| Windows py3.{7,9} | - | - | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml) | +| System / PyTorch ver. | 1.9 | 1.10 | 1.12 (latest) | +| :------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +| Linux py3.7 \[GPUs\*\*\] | - | - | - | +| Linux py3.7 \[TPUs\*\*\*\] | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/tpu-tests.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/tpu-tests.yml) | - | - | +| Linux py3.8 \[IPUs\] | [![Build Status]()](https://dev.azure.com/Lightning-AI/lightning/_build/latest?definitionId=25&branchName=master) | - | - | +| Linux py3.8 \[HPUs\] | - | [![Build Status]()](https://dev.azure.com/Lightning-AI/lightning/_build/latest?definitionId=26&branchName=master) | - | +| Linux py3.{7,9} | - | - | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml) | +| OSX py3.{7,9} | - | - | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml) | +| Windows py3.{7,9} | - | - | [![Test](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml/badge.svg?branch=master&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml) | - _\*\* tests run on two NVIDIA P100_ - _\*\*\* tests run on Google GKE TPUv2/3. TPU py3.7 means we support Colab and Kaggle env._ @@ -128,22 +126,13 @@ conda install pytorch-lightning -c conda-forge #### Install stable version -The actual status of stable is the following: - -[![Test PyTorch full](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml/badge.svg?branch=release%2Fpytorch&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-full.yml) -[![Test PyTorch with Conda](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-conda.yml/badge.svg?branch=release%2Fpytorch&event=push)](https://github.com/Lightning-AI/lightning/actions/workflows/ci-pytorch-test-conda.yml) -[![GPU]()](https://dev.azure.com/Lightning-AI/lightning/_build/latest?definitionId=24&branchName=release%2Fpytorch) -[![TPU](https://dl.circleci.com/status-badge/img/gh/Lightning-AI/lightning/tree/release%2Fpytorch.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/Lightning-AI/lightning/tree/release%2Fpytorch) -[![IPU]()](https://dev.azure.com/Lightning-AI/lightning/_build/latest?definitionId=25&branchName=release%2Fpytorch) -[![HPU]()](https://dev.azure.com/Lightning-AI/lightning/_build/latest?definitionId=26&branchName=release%2Fpytorch) - Install future release from the source ```bash pip install https://github.com/Lightning-AI/lightning/archive/refs/heads/release/stable.zip -U ``` -#### Install bleeding-edge - future 1.7 +#### Install bleeding-edge Install nightly from the source (no guarantees)