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

Error messages for removed Trainer mixin methods #15065

Merged
merged 30 commits into from
Oct 11, 2022

Conversation

awaelchli
Copy link
Contributor

@awaelchli awaelchli commented Oct 10, 2022

What does this PR do?

Follow up to #14888, #14887 in accordance to #15049.

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, 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)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

I made sure I had fun coding 🙃

cc @Borda @justusschock @kaushikb11 @awaelchli @ananthsub @ninginthecloud @jjenniferdai @rohitgr7 @akihironitta

@awaelchli awaelchli added breaking change Includes a breaking change trainer labels Oct 10, 2022
@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Oct 10, 2022
@awaelchli awaelchli added the pl Generic label for PyTorch Lightning package label Oct 10, 2022
@awaelchli awaelchli self-assigned this Oct 10, 2022
@awaelchli awaelchli added this to the pl:1.8 milestone Oct 10, 2022
@awaelchli awaelchli marked this pull request as ready for review October 11, 2022 09:23
@awaelchli awaelchli marked this pull request as draft October 11, 2022 09:23
Copy link
Contributor

@otaj otaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of graveyard, but wouldn't it be neater to have a magic decorator, that would take as params what is deprecated, when it was deprecated and removed and what should be used instead? I feel like we're duplicating quite a lot of text, that could be stored within this one magic function. cc @carmocca

@carmocca
Copy link
Contributor

@otaj You would need to be more specific with your proposal.

But in general, we don't care much about what's inside the graveyard (it's all dead code!)

In my PR, I did some hacking to create classes dynamically and write less code: https://github.com/Lightning-AI/lightning/pull/15061/files#diff-6ccf6181b48656c99d6106f8a2c2f98904cdc7f06155bdffd9b02ec5afa48c45R51 but I don't think we really need to care about writing the least possible lines of code.

So, if you have a specific suggestion, we can totally add it as long as it's self-contained inside the graveyard

@otaj
Copy link
Contributor

otaj commented Oct 11, 2022

@carmocca, perfectly fair, this was just an idea in my head. The argument, that it's all dead code, is perfectly valid., let's disregard my comment 😄 ⚡

@awaelchli awaelchli marked this pull request as ready for review October 11, 2022 18:28
src/pytorch_lightning/_graveyard/trainer.py Outdated Show resolved Hide resolved
src/pytorch_lightning/_graveyard/trainer.py Outdated Show resolved Hide resolved
src/pytorch_lightning/_graveyard/trainer.py Show resolved Hide resolved
@mergify mergify bot added the ready PRs ready to be merged label Oct 11, 2022
awaelchli and others added 2 commits October 11, 2022 15:06
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
@awaelchli awaelchli merged commit b1cc740 into master Oct 11, 2022
@awaelchli awaelchli deleted the feature/remove/trainer-mixins branch October 11, 2022 20:10
nicolai86 pushed a commit that referenced this pull request Oct 13, 2022
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Includes a breaking change pl Generic label for PyTorch Lightning package ready PRs ready to be merged trainer
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants