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

Inspect correct function in wrap_init #12716

Merged
merged 8 commits into from
Apr 15, 2022
Merged

Conversation

otaj
Copy link
Contributor

@otaj otaj commented Apr 11, 2022

What does this PR do?

In the function _wrap_init, the function of the live object was inspected, which was incorrect in the case of multiple inheritance, as the signature was always of the one function only. This PR inspects the function that should be actually invoked.

Fixes #12564

Extra test case, that copies the behavior from #12564 is created.

Does your PR introduce any breaking changes? If yes, please list them.

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 list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is welcome to review the PR.
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?

Make sure you had fun coding 🙃

cc @justusschock @awaelchli @ninginthecloud @rohitgr7 @Borda @akihironitta @carmocca

@otaj otaj added data handling Generic data-related topic tests labels Apr 11, 2022
@otaj otaj added this to the 1.6.x milestone Apr 11, 2022
@otaj otaj self-assigned this Apr 11, 2022
Copy link
Contributor

@carmocca carmocca left a comment

Choose a reason for hiding this comment

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

Nice!

pytorch_lightning/utilities/data.py Outdated Show resolved Hide resolved
pytorch_lightning/utilities/data.py Outdated Show resolved Hide resolved
pytorch_lightning/utilities/data.py Outdated Show resolved Hide resolved
pytorch_lightning/utilities/data.py Outdated Show resolved Hide resolved
tests/utilities/test_data.py Outdated Show resolved Hide resolved
tests/utilities/test_data.py Show resolved Hide resolved
pytorch_lightning/utilities/data.py Outdated Show resolved Hide resolved
@mergify mergify bot added the ready PRs ready to be merged label Apr 12, 2022
@otaj otaj requested a review from a team April 14, 2022 22:13
Copy link
Contributor

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

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

nice.

@awaelchli awaelchli merged commit b8d4b81 into master Apr 15, 2022
@awaelchli awaelchli deleted the bugfix/dataloader_wrap_init branch April 15, 2022 11:58
@awaelchli awaelchli added the bug Something isn't working label Apr 15, 2022
otaj added a commit that referenced this pull request Apr 19, 2022

Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: Rohit Gupta <[email protected]>
@carmocca
Copy link
Contributor

@otaj We missed adding a CHANGELOG "Fixed" entry for this PR. Can you add it in a different one?

@otaj otaj mentioned this pull request Apr 20, 2022
12 tasks
@otaj
Copy link
Contributor Author

otaj commented Apr 20, 2022

@carmocca Done in #12813

akihironitta pushed a commit that referenced this pull request Apr 20, 2022
otaj added a commit that referenced this pull request Apr 20, 2022
otaj added a commit that referenced this pull request Apr 20, 2022
otaj added a commit that referenced this pull request Apr 20, 2022
lexierule pushed a commit that referenced this pull request Apr 27, 2022

Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: Rohit Gupta <[email protected]>
lexierule pushed a commit that referenced this pull request Apr 27, 2022
@rohitgr7 rohitgr7 mentioned this pull request Jul 1, 2022
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working data handling Generic data-related topic ready PRs ready to be merged tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inheritance of Data Loaders
4 participants