Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump lightning[pytorch-extra] from 2.4.0 to 2.5.0 in /requirements #2484

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 20, 2024

Bumps lightning[pytorch-extra] from 2.4.0 to 2.5.0.

Release notes

Sourced from lightning[pytorch-extra]'s releases.

Lightning v2.5

Lightning AI ⚡ is excited to announce the release of Lightning 2.5.

Lightning 2.5 comes with improvements on several fronts, with zero API changes. Our users love it stable, we keep it stable 😄.

Talking about love ❤️, the lightning, pytorch-lightning and lightning-fabric packages are collectively getting more than 10M downloads per month 😮, for a total of over 180M downloads 🤯 since the early days . It's incredible to see PyTorch Lightning getting such a strong adoption across the industry and the sciences.

Release 2.5 embraces PyTorch 2.5, and it marks some of its more recent directions as officially supported, namely tensor subclass-based APIs like Distributed Tensors and TorchAO, in combination with torch.compile.

Here's a couple of examples:

Full example here

import lightning as L
import torch
import torch.nn as nn
import torch.nn.functional as F
from lightning.pytorch.demos import Transformer, WikiText2
from lightning.pytorch.strategies import ModelParallelStrategy
from torch.distributed._composable.fsdp.fully_shard import fully_shard
from torch.utils.data import DataLoader
from torchao.float8 import Float8LinearConfig, convert_to_float8_training
class LanguageModel(L.LightningModule):
def init(self, vocab_size):
super().init()
self.vocab_size = vocab_size
self.model = None
def configure_model(self):
    if self.model is not None:
        return
with torch.device("meta"):
    model = Transformer(
        vocab_size=self.vocab_size,
        nlayers=16,
        nhid=4096,
        ninp=1024,
        nhead=32,
    )

float8_config = Float8LinearConfig(
    # pip install -U --index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/Triton-Nightly/pypi/simple/ triton-nightly  # noqa
    pad_inner_dim=True,
)


</tr></table>

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [lightning[pytorch-extra]](https://github.com/Lightning-AI/lightning) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/Lightning-AI/lightning/releases)
- [Commits](Lightning-AI/pytorch-lightning@2.4.0...2.5.0)

---
updated-dependencies:
- dependency-name: lightning[pytorch-extra]
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Packaging and dependencies python Pull requests that update Python code labels Dec 20, 2024
@adamjstewart
Copy link
Collaborator

@lantiga
Copy link

lantiga commented Dec 20, 2024

Quoting from Lightning-AI/pytorch-lightning#20511 (comment)

the return type for configure_optimizers hasn't been actually changed, it was OptimizerLRScheduler before and it still is. However that is a composite type and I renamed it in a PR: it was OptimizerLRSchedulerConfig and it now is OptimizerLRSchedulerConfigType thinking that it would not be impactful downstream but apparently it is.

So you can fix the above by doing
from lightning.pytorch.utilities.types import OptimizerLRSchedulerConfigType
but I'm thinking we could just quickly go back to the previous name and avoid breaking the contract

What do you think @adamjstewart

@adamjstewart
Copy link
Collaborator

Going back to the previous name, or at least providing a deprecated alias for the old name, would be least impactful. Especially in a release that boasts no API changes 😉

We're also fine with adding a try-except on that import as needed. We just finished a 0.6.2 release yesterday so might not see a new release to fix support for lightning 2.5+ for a while though.

@lantiga
Copy link

lantiga commented Dec 20, 2024

We had no intention to break the contract, the rename just happened and it ultimately flew under the radar (and on top of that it was all my fault :-) )

@adamjstewart
Copy link
Collaborator

Yep, no worries, type hints are a very minor part of the API for most users, I don't expect this impacts individual lightning users as much as it impacts the libraries that depend on lightning.

@lantiga
Copy link

lantiga commented Dec 21, 2024

Release is out: https://github.com/Lightning-AI/pytorch-lightning/releases/tag/2.5.0.post0
feel free to bump to lightning[pytorch-extra]==2.5.0.post0

Copy link
Contributor Author

dependabot bot commented on behalf of github Dec 23, 2024

Superseded by #2489.

@dependabot dependabot bot closed this Dec 23, 2024
@dependabot dependabot bot deleted the dependabot/pip/requirements/lightning-pytorch-extra--2.5.0 branch December 23, 2024 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Packaging and dependencies python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants