Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions .github/actions/pkg-publish/action.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/label-conflicts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
triage-conflicts:
runs-on: ubuntu-latest
steps:
- uses: mschilde/auto-label-merge-conflicts@591722e97f3c4142df3eca156ed0dcf2bcd362bd # Oct 25, 2021
- uses: mschilde/auto-label-merge-conflicts@cd484bbf0476fbe79474a937681a253e094cac3d # May 9, 2026
with:
CONFLICT_LABEL_NAME: "has conflicts"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
paths:
- "requirements/ci.txt"
- ".github/actions/pkg-check/*"
- ".github/actions/pkg-publish/*"
- ".github/workflows/release-nightly.yml"
schedule:
- cron: "0 0 * * 0" # on Sundays
Expand Down Expand Up @@ -45,24 +44,3 @@ jobs:
name: nightly-packages-${{ github.sha }}
path: dist
include-hidden-files: true

publish-packages:
runs-on: ubuntu-22.04
needs: build-packages
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
env:
PKG_NAME: "lightning"
steps:
- uses: actions/checkout@v6 # needed to use local composite action
- uses: actions/download-artifact@v8
with:
name: nightly-packages-${{ github.sha }}
path: dist
- uses: ./.github/actions/pkg-publish
with:
pkg-folder: dist
pypi-test-token: ${{ secrets[format('PYPI_TEST_TOKEN_{0}', env.PKG_NAME)] }}
- uses: ./.github/actions/pkg-publish
with:
pkg-folder: dist
pypi-token: ${{ secrets[format('PYPI_TOKEN_{0}', env.PKG_NAME)] }}
36 changes: 7 additions & 29 deletions .github/workflows/release-pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
paths:
- "requirements/ci.txt"
- ".github/actions/pkg-check/*"
- ".github/actions/pkg-publish/*"
- ".github/workflows/_legacy-checkpoints.yml"
- ".github/workflows/_build-packages.yml"
- ".github/workflows/release-pypi.yml"
Expand Down Expand Up @@ -130,35 +129,12 @@ jobs:
ethanwharris
borda

pre-publish-packages:
runs-on: ubuntu-22.04
needs: build-packages
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
strategy:
fail-fast: false
matrix:
name: ["FABRIC", "PYTORCH", "LIGHTNING"]
steps:
- uses: actions/checkout@v6 # needed for local action below
- uses: actions/download-artifact@v8
with:
name: dist-packages-${{ github.sha }}
path: dist
- name: Browse folder
id: folder
run: |
sudo apt install -q -y tree
tree -L 2 -h dist/
python -c "print('pkg=' + '${{ matrix.name }}'.lower())" >> $GITHUB_OUTPUT
- uses: ./.github/actions/pkg-publish
with:
pkg-folder: dist/${{ steps.folder.outputs.pkg }}
pypi-test-token: ${{ secrets[format('PYPI_TEST_TOKEN_{0}', matrix.name)] }}

publish-packages:
runs-on: ubuntu-22.04
needs: [build-packages]
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
permissions:
id-token: write
strategy:
fail-fast: false
matrix:
Expand All @@ -175,10 +151,12 @@ jobs:
sudo apt install -q -y tree
tree -L 2 -h dist/
python -c "print('pkg=' + '${{ matrix.name }}'.lower())" >> $GITHUB_OUTPUT
- uses: ./.github/actions/pkg-publish

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@v1.5.1
with:
pkg-folder: dist/${{ steps.folder.outputs.pkg }}
pypi-token: ${{ secrets[format('PYPI_TOKEN_{0}', matrix.name)] }}
packages_dir: dist/${{ steps.folder.outputs.pkg }}
verbose: true

legacy-checkpoints:
needs: [build-packages]
Expand Down
15 changes: 7 additions & 8 deletions src/lightning/pytorch/core/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -1498,11 +1498,10 @@ def to_torchscript(
example_inputs: Optional[Any] = None,
**kwargs: Any,
) -> Union[ScriptModule, dict[str, ScriptModule]]:
"""By default compiles the whole model to a :class:`~torch.jit.ScriptModule`. If you want to use tracing,
please provided the argument ``method='trace'`` and make sure that either the `example_inputs` argument is
provided, or the model has :attr:`example_input_array` set. If you would like to customize the modules that are
scripted you should override this method. In case you want to return multiple modules, we recommend using a
dictionary.
"""By default compiles the whole model to a ``torch.jit.ScriptModule``. If you want to use tracing, please
provided the argument ``method='trace'`` and make sure that either the `example_inputs` argument is provided,
or the model has :attr:`example_input_array` set. If you would like to customize the modules that are scripted
you should override this method. In case you want to return multiple modules, we recommend using a dictionary.

.. deprecated::
``LightningModule.to_torchscript`` has been deprecated in v2.7 and will be removed in v2.8.
Expand All @@ -1514,15 +1513,15 @@ def to_torchscript(
method: Whether to use TorchScript's script or trace method. Default: 'script'
example_inputs: An input to be used to do tracing when method is set to 'trace'.
Default: None (uses :attr:`example_input_array`)
**kwargs: Additional arguments that will be passed to the :func:`torch.jit.script` or
:func:`torch.jit.trace` function.
**kwargs: Additional arguments that will be passed to the ``torch.jit.script`` or
``torch.jit.trace`` function.

Note:
- Requires the implementation of the
:meth:`~lightning.pytorch.core.LightningModule.forward` method.
- The exported script will be set to evaluation mode.
- It is recommended that you install the latest supported version of PyTorch
to use this feature without limitations. See also the :mod:`torch.jit`
to use this feature without limitations. See also the ``torch.jit``
documentation for supported features.

Example::
Expand Down
2 changes: 1 addition & 1 deletion src/version.info
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.2
2.6.4
Loading