diff --git a/.actions/assistant.py b/.actions/assistant.py index 47a0543f228ad..7b2d49423d622 100644 --- a/.actions/assistant.py +++ b/.actions/assistant.py @@ -154,8 +154,8 @@ def load_readme_description(path_dir: str, homepage: str, version: str) -> str: """ path_readme = os.path.join(path_dir, "README.md") - with open(path_readme, encoding="utf-8") as fo: - text = fo.read() + with open(path_readme, encoding="utf-8") as fopen: + text = fopen.read() # drop images from readme text = text.replace( @@ -308,17 +308,17 @@ def copy_replace_imports( if ext in (".pyc",): continue # Try to parse everything else - with open(fp, encoding="utf-8") as fo: + with open(fp, encoding="utf-8") as fopen: try: - lines = fo.readlines() + lines = fopen.readlines() except UnicodeDecodeError: # a binary file, skip print(f"Skipped replacing imports for {fp}") continue lines = _replace_imports(lines, list(zip(source_imports, target_imports)), lightning_by=lightning_by) os.makedirs(os.path.dirname(fp_new), exist_ok=True) - with open(fp_new, "w", encoding="utf-8") as fo: - fo.writelines(lines) + with open(fp_new, "w", encoding="utf-8") as fopen: + fopen.writelines(lines) def create_mirror_package(source_dir: str, package_mapping: dict[str, str]) -> None: @@ -370,10 +370,10 @@ def _prune_packages(req_file: str, packages: Sequence[str]) -> None: @staticmethod def _replace_min(fname: str) -> None: - with open(fname, encoding="utf-8") as fo: - req = fo.read().replace(">=", "==") - with open(fname, "w", encoding="utf-8") as fw: - fw.write(req) + with open(fname, encoding="utf-8") as fopen: + req = fopen.read().replace(">=", "==") + with open(fname, "w", encoding="utf-8") as fwrite: + fwrite.write(req) @staticmethod def replace_oldest_ver(requirement_fnames: Sequence[str] = REQUIREMENT_FILES_ALL) -> None: @@ -471,15 +471,15 @@ def convert_version2nightly(ver_file: str = "src/version.info") -> None: """Load the actual version and convert it to the nightly version.""" from datetime import datetime - with open(ver_file) as fo: - version = fo.read().strip() + with open(ver_file) as fopen: + version = fopen.read().strip() # parse X.Y.Z version and prune any suffix vers = re.match(r"(\d+)\.(\d+)\.(\d+).*", version) # create timestamp YYYYMMDD timestamp = datetime.now().strftime("%Y%m%d") version = f"{'.'.join(vers.groups())}.dev{timestamp}" - with open(ver_file, "w") as fo: - fo.write(version + os.linesep) + with open(ver_file, "w") as fopen: + fopen.write(version + os.linesep) @staticmethod def generate_docker_tags( diff --git a/.azure/gpu-tests-fabric.yml b/.azure/gpu-tests-fabric.yml index 4d738d9110599..583451fa0cdfa 100644 --- a/.azure/gpu-tests-fabric.yml +++ b/.azure/gpu-tests-fabric.yml @@ -60,10 +60,13 @@ jobs: image: "pytorchlightning/pytorch_lightning:base-cuda-py3.10-torch2.1-cuda12.1.1" PACKAGE_NAME: "fabric" "Fabric | latest": - image: "pytorchlightning/pytorch_lightning:base-cuda-py3.12-torch2.6-cuda12.4.1" + image: "pytorchlightning/pytorch_lightning:base-cuda-py3.12-torch2.7-cuda12.6.3" PACKAGE_NAME: "fabric" + #"Fabric | future": + # image: "pytorchlightning/pytorch_lightning:base-cuda-py3.12-torch2.7-cuda12.6.3" + # PACKAGE_NAME: "fabric" "Lightning | latest": - image: "pytorchlightning/pytorch_lightning:base-cuda-py3.12-torch2.6-cuda12.4.1" + image: "pytorchlightning/pytorch_lightning:base-cuda-py3.12-torch2.7-cuda12.6.3" PACKAGE_NAME: "lightning" workspace: clean: all diff --git a/.azure/gpu-tests-pytorch.yml b/.azure/gpu-tests-pytorch.yml index 414f98dab3f66..eb76cd49e3f94 100644 --- a/.azure/gpu-tests-pytorch.yml +++ b/.azure/gpu-tests-pytorch.yml @@ -53,10 +53,13 @@ jobs: image: "pytorchlightning/pytorch_lightning:base-cuda-py3.10-torch2.1-cuda12.1.1" PACKAGE_NAME: "pytorch" "PyTorch | latest": - image: "pytorchlightning/pytorch_lightning:base-cuda-py3.12-torch2.6-cuda12.4.1" + image: "pytorchlightning/pytorch_lightning:base-cuda-py3.12-torch2.7-cuda12.6.3" PACKAGE_NAME: "pytorch" + #"PyTorch | future": + # image: "pytorchlightning/pytorch_lightning:base-cuda-py3.12-torch2.7-cuda12.6.3" + # PACKAGE_NAME: "pytorch" "Lightning | latest": - image: "pytorchlightning/pytorch_lightning:base-cuda-py3.12-torch2.6-cuda12.4.1" + image: "pytorchlightning/pytorch_lightning:base-cuda-py3.12-torch2.7-cuda12.6.3" PACKAGE_NAME: "lightning" pool: lit-rtx-3090 variables: @@ -114,7 +117,6 @@ jobs: set -e extra=$(python -c "print({'lightning': 'pytorch-'}.get('$(PACKAGE_NAME)', ''))") pip install -e ".[${extra}dev]" pytest-timeout -U --extra-index-url="${TORCH_URL}" - pip install setuptools==75.6.0 jsonargparse==4.35.0 displayName: "Install package & dependencies" - bash: pip uninstall -y lightning diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 91cf94023786c..cfb03d220c99c 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -97,7 +97,7 @@ _**Note**, even if you do not find the solution, sending a PR with a test coveri 1. Add/update the relevant tests! -- [This PR](https://github.com/Lightning-AI/lightning/pull/2671) is a good example for adding a new metric, and [this one for a new logger](https://github.com/Lightning-AI/lightning/pull/2721). +- [This PR](https://github.com/Lightning-AI/pytorch-lightning/pull/2671) is a good example for adding a new metric, and [this one for a new logger](https://github.com/Lightning-AI/pytorch-lightning/pull/2721). ### Test cases: @@ -130,11 +130,11 @@ In case you are adding new dependencies, make sure that they are compatible with ### Documentation -To learn about development of docs, check out the docs [README.md](https://github.com/Lightning-AI/lightning/blob/master/docs/README.md). +To learn about development of docs, check out the docs [README.md](https://github.com/Lightning-AI/pytorch-lightning/blob/master/docs/README.md). ### Testing -To learn about tests, check out the tests [README.md](https://github.com/Lightning-AI/lightning/blob/master/tests/README.md). +To learn about tests, check out the tests [README.md](https://github.com/Lightning-AI/pytorch-lightning/blob/master/tests/README.md). ### Pull Request @@ -165,8 +165,8 @@ We welcome any useful contribution! For your convenience here's a recommended wo 1. If any of the existing tests fail in your PR on our CI, refer to the following READMEs to identify what's failing and try to address it. - - [Test README](https://github.com/Lightning-AI/lightning/blob/master/tests/README.md) - - [CI/CD README](https://github.com/Lightning-AI/lightning/blob/master/.github/workflows/README.md) + - [Test README](https://github.com/Lightning-AI/pytorch-lightning/blob/master/tests/README.md) + - [CI/CD README](https://github.com/Lightning-AI/pytorch-lightning/tree/master/.github/workflows#readme) 1. When you feel ready for integrating your work, mark your PR "Ready for review". diff --git a/.github/ISSUE_TEMPLATE/1_bug_report.yaml b/.github/ISSUE_TEMPLATE/1_bug_report.yaml index 423de06f191bc..917a0fcdaf09e 100644 --- a/.github/ISSUE_TEMPLATE/1_bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/1_bug_report.yaml @@ -46,12 +46,22 @@ body: attributes: value: "**Note: The rest of this form is optional, but filling it out may help us to provide better support.**" + - type: input + attributes: + label: Reproduced in studio + description: > + Create a new Lightning Studio with code that reproduces the issue and share the link. + Also include all the relevant files and data required to reproduce shared issue. + In case the code does not crash, please add assert statements to show what is the real and expected output. + A simple guide on how to create such a studio can be found [here](https://www.youtube.com/watch?v=YcW-2Zt_bFg&ab_channel=LightningAI). + placeholder: https://lightning.ai/live-session/... + validations: + required: false - type: textarea attributes: label: How to reproduce the bug description: > - Provide steps and example code here. - You can also paste a link to Google Colab (see our [Colab bug report template](https://colab.research.google.com/github/Lightning-AI/lightning/blob/master/examples/pytorch/bug_report/bug_report_model.ipynb)) or adapt this minimal [snippet](https://github.com/Lightning-AI/lightning/blob/master/examples/pytorch/bug_report/bug_report_model.py). + In the special case when the issue can't be reproduced in a studio, provide steps and example code here. placeholder: | ```python # Sample code to reproduce the problem diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index fe89375a04e83..cd784a5037525 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -18,7 +18,7 @@ Fixes #\ Before submitting - Was this **discussed/agreed** via a GitHub issue? (not for typos and docs) -- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/lightning/blob/master/.github/CONTRIBUTING.md), **Pull Request** section? +- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/master/.github/CONTRIBUTING.md), **Pull Request** section? - [ ] Did you make sure your **PR does only one thing**, instead of bundling different changes together? - Did you make sure to **update the documentation** with your changes? (if necessary) - Did you write any **new necessary tests**? (not for typos and docs) diff --git a/.github/checkgroup.yml b/.github/checkgroup.yml index 271284635b638..5564879229f08 100644 --- a/.github/checkgroup.yml +++ b/.github/checkgroup.yml @@ -127,12 +127,15 @@ subprojects: - "build-cuda (3.11, 2.3.1, 12.1.1)" - "build-cuda (3.11, 2.4.1, 12.1.1)" - "build-cuda (3.12, 2.5.1, 12.1.1)" + - "build-cuda (3.12, 2.6.0, 12.4.1)" #- "build-NGC" - "build-pl (3.10, 2.1, 12.1.1)" - "build-pl (3.11, 2.2, 12.1.1)" - "build-pl (3.11, 2.3, 12.1.1)" - "build-pl (3.11, 2.4, 12.1.1)" - - "build-pl (3.12, 2.5, 12.1.1, true)" + - "build-pl (3.12, 2.5, 12.1.1)" + - "build-pl (3.12, 2.6, 12.4.1)" + - "build-pl (3.12, 2.7, 12.6.3, true)" # SECTION: lightning_fabric @@ -173,14 +176,15 @@ subprojects: - "lightning-fabric (GPUs) (testing Fabric | latest)" - "lightning-fabric (GPUs) (testing Lightning | latest)" - - id: "lightning_fabric: TPU workflow" - paths: - # tpu CI availability is very limited, so we only require tpu tests - # to pass when their configurations are modified - - ".github/workflows/tpu-tests.yml" - - "tests/tests_fabric/run_tpu_tests.sh" - checks: - - "test-on-tpus (pytorch, pjrt, v4-8)" + # Temporarily disabled + # - id: "lightning_fabric: TPU workflow" + # paths: + # # tpu CI availability is very limited, so we only require tpu tests + # # to pass when their configurations are modified + # - ".github/workflows/tpu-tests.yml" + # - "tests/tests_fabric/run_tpu_tests.sh" + # checks: + # - "test-on-tpus (pytorch, pjrt, v4-8)" # SECTION: common diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 421314b211deb..3b2ab99d015c1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -19,8 +19,6 @@ updates: separator: "-" # Allow up to 5 open pull requests for pip dependencies open-pull-requests-limit: 10 - reviewers: - - "Lightning-AI/teams/core-lightning" # Enable version updates for GitHub Actions - package-ecosystem: "github-actions" @@ -37,5 +35,3 @@ updates: separator: "-" # Allow up to 5 open pull requests for GitHub Actions open-pull-requests-limit: 10 - reviewers: - - "Lightning-AI/teams/core-lightning" diff --git a/.github/markdown-links-config.json b/.github/markdown-links-config.json index 2568c8c8f65ba..bc9721da2c587 100644 --- a/.github/markdown-links-config.json +++ b/.github/markdown-links-config.json @@ -1,10 +1,13 @@ { "ignorePatterns": [ { - "pattern": "^https://github.com/Lightning-AI/lightning/pull/.*" + "pattern": "^https://github.com/Lightning-AI/pytorch-lightning/pull/" }, { - "pattern": "^https://dev.azure.com/Lightning-AI/lightning/_apis/build/status.*" + "pattern": "^https://dev.azure.com/Lightning-AI/lightning/_apis/build/status" + }, + { + "pattern": "^https://codecov.io/gh/Lightning-AI/pytorch-lightning/graph/badge.svg" } ], "httpHeaders": [ diff --git a/.github/mergify.yml b/.github/mergify.yml deleted file mode 100644 index e75925a1ad664..0000000000000 --- a/.github/mergify.yml +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright The Lightning AI team. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -pull_request_rules: - - name: warn on conflicts - conditions: - - conflict - - -draft # filter-out GH draft PRs - - -label="has conflicts" - actions: - # comment: - # message: This pull request is now in conflict... :( - label: - add: ["has conflicts"] - - - name: resolved conflicts - conditions: - - -conflict - - label="has conflicts" - - -draft # filter-out GH draft PRs - - -merged # not merged yet - - -closed - actions: - label: - remove: ["has conflicts"] - - - name: Ready to Go - conditions: - - -conflict - - -draft # filter-out GH draft PRs - - -title~=(?i)wip # skip all PR that title contains “WIP” (ignoring case) - - "#approved-reviews-by>=2" # number of review approvals - - "#changes-requested-reviews-by=0" # no requested changes - actions: - label: - add: ["ready"] - - - name: Not ready yet - conditions: - - or: - - draft # filter-out GH draft PRs - - label="has conflicts" - - "#approved-reviews-by=0" # number of review approvals - - "#changes-requested-reviews-by>=1" # no requested changes - actions: - label: - remove: ["ready"] - - - name: add core reviewer - conditions: - - -conflict # skip if conflict - - -draft # filter-out GH draft PRs - - label="ready" - - "#approved-reviews-by<2" # number of review approvals - - "#review-requested<2" # number of requested reviews - actions: - request_reviews: - teams: - - "@Lightning-AI/core-lightning" diff --git a/.github/workflows/_legacy-checkpoints.yml b/.github/workflows/_legacy-checkpoints.yml index de9db06251e77..6cf29c0bd19ad 100644 --- a/.github/workflows/_legacy-checkpoints.yml +++ b/.github/workflows/_legacy-checkpoints.yml @@ -111,8 +111,13 @@ jobs: retention-days: ${{ env.KEEP_DAYS }} include-hidden-files: true + - name: access secrets + # export to env bool if secrets.AWS_REGION is not empty + run: echo "WITH_SECRETS=$([ -n '${{ secrets.AWS_REGION }}' ] && echo 1 || echo 0)" >> $GITHUB_ENV + - run: pip install -r requirements/ci.txt - name: Upload checkpoints to S3 + if: ${{ env.WITH_SECRETS == '1' }} working-directory: ${{ env.LEGACY_FOLDER }} env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} diff --git a/.github/workflows/call-clear-cache.yml b/.github/workflows/call-clear-cache.yml index b736d2a91f55f..6422e856e09ff 100644 --- a/.github/workflows/call-clear-cache.yml +++ b/.github/workflows/call-clear-cache.yml @@ -23,18 +23,18 @@ on: jobs: cron-clear: if: github.event_name == 'schedule' || github.event_name == 'pull_request' - uses: Lightning-AI/utilities/.github/workflows/cleanup-caches.yml@v0.14.1 + uses: Lightning-AI/utilities/.github/workflows/cleanup-caches.yml@v0.14.3 with: - scripts-ref: v0.14.1 + scripts-ref: v0.14.3 dry-run: ${{ github.event_name == 'pull_request' }} pattern: "latest|docs" age-days: 7 direct-clear: if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' - uses: Lightning-AI/utilities/.github/workflows/cleanup-caches.yml@v0.14.1 + uses: Lightning-AI/utilities/.github/workflows/cleanup-caches.yml@v0.14.3 with: - scripts-ref: v0.14.1 + scripts-ref: v0.14.3 dry-run: ${{ github.event_name == 'pull_request' }} pattern: ${{ inputs.pattern || 'pypi_wheels' }} # setting str in case of PR / debugging age-days: ${{ fromJSON(inputs.age-days) || 0 }} # setting 0 in case of PR / debugging diff --git a/.github/workflows/ci-check-md-links.yml b/.github/workflows/ci-check-md-links.yml index b619b756c1349..12aca9547e7c7 100644 --- a/.github/workflows/ci-check-md-links.yml +++ b/.github/workflows/ci-check-md-links.yml @@ -9,12 +9,13 @@ on: types: [opened, reopened, ready_for_review, synchronize] paths: - ".github/workflows/ci-check-md-links.yml" - - ".github/workflows/markdown.links.config.json" + - ".github/markdown-links-config.json" - "**/*.md" jobs: check-md-links: - uses: Lightning-AI/utilities/.github/workflows/check-md-links.yml@v0.14.1 + uses: Lightning-AI/utilities/.github/workflows/check-md-links.yml@main # can be pin with >=0.14.4 with: config-file: ".github/markdown-links-config.json" base-branch: "master" + force-check-all: "yes" diff --git a/.github/workflows/ci-schema.yml b/.github/workflows/ci-schema.yml index aec5f9b4bc261..fe8cbfbc7ddb4 100644 --- a/.github/workflows/ci-schema.yml +++ b/.github/workflows/ci-schema.yml @@ -8,7 +8,7 @@ on: jobs: check: - uses: Lightning-AI/utilities/.github/workflows/check-schema.yml@v0.14.1 + uses: Lightning-AI/utilities/.github/workflows/check-schema.yml@v0.14.3 with: # skip azure due to the wrong schema file by MSFT # https://github.com/Lightning-AI/lightning-flash/pull/1455#issuecomment-1244793607 diff --git a/.github/workflows/ci-tests-fabric.yml b/.github/workflows/ci-tests-fabric.yml index b94772b4fbcbc..4e4d2c9eed3cb 100644 --- a/.github/workflows/ci-tests-fabric.yml +++ b/.github/workflows/ci-tests-fabric.yml @@ -68,9 +68,9 @@ jobs: - { os: "ubuntu-22.04", pkg-name: "fabric", python-version: "3.10", pytorch-version: "2.5" } - { os: "windows-2022", pkg-name: "fabric", python-version: "3.10", pytorch-version: "2.5" } # adding recently cut Torch 2.7 - FUTURE - # - { os: "macOS-14", pkg-name: "fabric", python-version: "3.12", pytorch-version: "2.7" } - # - { os: "ubuntu-22.04", pkg-name: "fabric", python-version: "3.12", pytorch-version: "2.7" } - # - { os: "windows-2022", pkg-name: "fabric", python-version: "3.12", pytorch-version: "2.7" } + - { os: "macOS-14", pkg-name: "fabric", python-version: "3.12", pytorch-version: "2.7" } + - { os: "ubuntu-22.04", pkg-name: "fabric", python-version: "3.12", pytorch-version: "2.7" } + - { os: "windows-2022", pkg-name: "fabric", python-version: "3.12", pytorch-version: "2.7" } timeout-minutes: 25 # because of building grpcio on Mac env: PACKAGE_NAME: ${{ matrix.pkg-name }} @@ -116,7 +116,7 @@ jobs: mkdir -p $PYPI_CACHE_DIR ls -lh $PYPI_CACHE_DIR - - name: Env. variables + - name: Expand Env. variables run: | # Switch PyTorch URL between stable and test/future python -c "print('TORCH_URL=' + str('${{env.TORCH_URL_TEST}}' if '${{ matrix.pytorch-version }}' == '2.7' else '${{env.TORCH_URL_STABLE}}'))" >> $GITHUB_ENV @@ -124,8 +124,16 @@ jobs: python -c "print('COVERAGE_SCOPE=' + str('lightning' if '${{matrix.pkg-name}}' == 'lightning' else 'lightning_fabric'))" >> $GITHUB_ENV # if you install mono-package set dependency only for this subpackage python -c "print('EXTRA_PREFIX=' + str('' if '${{matrix.pkg-name}}' != 'lightning' else 'fabric-'))" >> $GITHUB_ENV + - name: Append Env. vars for MacOS + if: ${{ runner.os == 'macOS' }} + run: | + # trying to avoid "gloo" issue with SIGABRT + echo "GLOO_SOCKET_IFNAME=lo0" >> $GITHUB_ENV + - name: Append Env. vars for Windows + if: ${{ runner.os == 'windows' }} + run: | # Avoid issue on Windows with PyTorch 2.4: "RuntimeError: use_libuv was requested but PyTorch was build without libuv support" - python -c "print('USE_LIBUV=0' if '${{matrix.os}}' == 'windows-2022' and '${{matrix.pytorch-version}}' == '2.4' else '')" >> $GITHUB_ENV + echo "USE_LIBUV=0" >> $GITHUB_ENV - name: Install package & dependencies timeout-minutes: 20 @@ -159,7 +167,8 @@ jobs: run: | echo $GITHUB_RUN_ID python -m coverage run --source ${{ env.COVERAGE_SCOPE }} \ - -m pytest -v --timeout=30 --durations=50 --random-order-seed=$GITHUB_RUN_ID + -m pytest -v --timeout=30 --durations=50 --random-order-seed=$GITHUB_RUN_ID \ + --junitxml=junit.xml -o junit_family=legacy # NOTE: for Codecov's test results - name: Statistics if: success() diff --git a/.github/workflows/ci-tests-pytorch.yml b/.github/workflows/ci-tests-pytorch.yml index a731723b25fad..d295d5475942a 100644 --- a/.github/workflows/ci-tests-pytorch.yml +++ b/.github/workflows/ci-tests-pytorch.yml @@ -72,9 +72,9 @@ jobs: - { os: "ubuntu-22.04", pkg-name: "pytorch", python-version: "3.10", pytorch-version: "2.5" } - { os: "windows-2022", pkg-name: "pytorch", python-version: "3.10", pytorch-version: "2.5" } # adding recently cut Torch 2.7 - FUTURE - # - { os: "macOS-14", pkg-name: "pytorch", python-version: "3.12", pytorch-version: "2.7" } - # - { os: "ubuntu-22.04", pkg-name: "pytorch", python-version: "3.12", pytorch-version: "2.7" } - # - { os: "windows-2022", pkg-name: "pytorch", python-version: "3.12", pytorch-version: "2.7" } + - { os: "macOS-14", pkg-name: "pytorch", python-version: "3.12", pytorch-version: "2.7" } + - { os: "ubuntu-22.04", pkg-name: "pytorch", python-version: "3.12", pytorch-version: "2.7" } + - { os: "windows-2022", pkg-name: "pytorch", python-version: "3.12", pytorch-version: "2.7" } timeout-minutes: 50 env: PACKAGE_NAME: ${{ matrix.pkg-name }} @@ -196,7 +196,8 @@ jobs: run: | echo $GITHUB_RUN_ID python -m coverage run --source ${{ env.COVERAGE_SCOPE }} \ - -m pytest . -v --timeout=60 --durations=50 --random-order-seed=$GITHUB_RUN_ID + -m pytest . -v --timeout=60 --durations=50 --random-order-seed=$GITHUB_RUN_ID \ + --junitxml=junit.xml -o junit_family=legacy # NOTE: for Codecov's test results - name: Statistics if: success() @@ -205,6 +206,12 @@ jobs: coverage report coverage xml + - name: Upload test results to Codecov + if: ${{ !cancelled() }} # Run even if tests fail + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 # see: https://github.com/actions/toolkit/issues/399 diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index b623cdc9337f3..bb98466f30f72 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -47,7 +47,9 @@ jobs: - { python_version: "3.11", pytorch_version: "2.2", cuda_version: "12.1.1" } - { python_version: "3.11", pytorch_version: "2.3", cuda_version: "12.1.1" } - { python_version: "3.11", pytorch_version: "2.4", cuda_version: "12.1.1" } - - { python_version: "3.12", pytorch_version: "2.5", cuda_version: "12.1.1", latest: "true" } + - { python_version: "3.12", pytorch_version: "2.5", cuda_version: "12.1.1" } + - { python_version: "3.12", pytorch_version: "2.6", cuda_version: "12.4.1" } + - { python_version: "3.12", pytorch_version: "2.7", cuda_version: "12.6.3", latest: "true" } steps: - uses: actions/checkout@v4 with: @@ -92,6 +94,11 @@ jobs: strategy: fail-fast: false matrix: + # adding some more images as Thunder mainly using python 3.10, + # and we need to support integrations as for example LitGPT + python_version: ["3.10"] + pytorch_version: ["2.6.0", "2.7.1"] + cuda_version: ["12.6.3"] include: # These are the base images for PL release docker images. # Make sure the matrix here matches the one above. @@ -101,6 +108,7 @@ jobs: - { python_version: "3.11", pytorch_version: "2.4.1", cuda_version: "12.1.1" } - { python_version: "3.12", pytorch_version: "2.5.1", cuda_version: "12.1.1" } - { python_version: "3.12", pytorch_version: "2.6.0", cuda_version: "12.4.1" } + - { python_version: "3.12", pytorch_version: "2.7.1", cuda_version: "12.6.3" } steps: - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 @@ -131,7 +139,7 @@ jobs: status: ${{ job.status }} token: ${{ secrets.GITHUB_TOKEN }} notification_title: ${{ format('CUDA; {0} py{1} for *{2}*', runner.os, matrix.python_version, matrix.pytorch_version) }} - message_format: "{emoji} *{workflow}* {status_message}, see <{run_url}|detail>, cc: <@U01A5T7EY9M>" # akihironitta + message_format: "{emoji} *{workflow}* {status_message}, see <{run_url}|detail>, cc: <@U01A5T7EY9M>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/label-conflicts.yml b/.github/workflows/label-conflicts.yml new file mode 100644 index 0000000000000..06a809c48b541 --- /dev/null +++ b/.github/workflows/label-conflicts.yml @@ -0,0 +1,22 @@ +name: Label conflicts + +on: + push: + branches: ["main"] + pull_request_target: + types: ["synchronize", "reopened", "opened"] + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: false + +jobs: + triage-conflicts: + runs-on: ubuntu-latest + steps: + - uses: mschilde/auto-label-merge-conflicts@591722e97f3c4142df3eca156ed0dcf2bcd362bd # Oct 25, 2021 + with: + CONFLICT_LABEL_NAME: "has conflicts" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MAX_RETRIES: 3 + WAIT_MS: 5000 diff --git a/.github/workflows/release-pkg.yml b/.github/workflows/release-pkg.yml index 9786c2f57b3c7..348d4ce753117 100644 --- a/.github/workflows/release-pkg.yml +++ b/.github/workflows/release-pkg.yml @@ -13,7 +13,7 @@ on: - "requirements/ci.txt" - ".github/actions/pkg-check/*" - ".github/actions/pkg-publish/*" - - ".github/workflows/_legacy-checkpoints.yml.yml" + - ".github/workflows/_legacy-checkpoints.yml" - ".github/workflows/_build-packages.yml" - ".github/workflows/release-pypi.yml" diff --git a/.github/workflows/tpu-tests.yml.disabled b/.github/workflows/tpu-tests.yml similarity index 100% rename from .github/workflows/tpu-tests.yml.disabled rename to .github/workflows/tpu-tests.yml diff --git a/.gitignore b/.gitignore index cf5face7db3d4..42c36e534d5ef 100644 --- a/.gitignore +++ b/.gitignore @@ -198,7 +198,7 @@ node_modules/ **/events.out.tfevents.* examples/**/*.png -# instalation artifacts +# installation artifacts requirements/base.txt # CI diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f2e475f602913..4723638fc5e4a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,7 +51,7 @@ repos: - id: detect-private-key - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 + rev: v2.4.1 hooks: - id: codespell additional_dependencies: [tomli] @@ -70,7 +70,7 @@ repos: - id: sphinx-lint - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.6 + rev: v0.11.4 hooks: # try to fix what is possible - id: ruff @@ -81,7 +81,7 @@ repos: - id: ruff - repo: https://github.com/executablebooks/mdformat - rev: 0.7.21 + rev: 0.7.22 hooks: - id: mdformat additional_dependencies: diff --git a/README.md b/README.md index aa58c6d8a585a..dd5f0fe43e0c7 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ ______________________________________________________________________ [![Discord](https://img.shields.io/discord/1077906959069626439?style=plastic)](https://discord.gg/VptPCZkGNa) ![GitHub commit activity](https://img.shields.io/github/commit-activity/w/lightning-ai/lightning) -[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/Lightning-AI/lightning/blob/master/LICENSE) +[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/Lightning-AI/pytorch-lightning/blob/master/LICENSE) @@ -28,7 +28,7 @@ ______________________________________________________________________ [![codecov](https://codecov.io/gh/Lightning-AI/pytorch-lightning/graph/badge.svg?token=SmzX8mnKlA)](https://codecov.io/gh/Lightning-AI/pytorch-lightning) [![ReadTheDocs](https://readthedocs.org/projects/pytorch-lightning/badge/?version=stable)](https://lightning.ai/docs/pytorch/stable/)[![Discord](https://img.shields.io/discord/1077906959069626439?style=plastic)](https://discord.gg/VptPCZkGNa) -[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/Lightning-AI/lightning/blob/master/LICENSE) +[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/Lightning-AI/pytorch-lightning/blob/master/LICENSE)