Skip to content

Conversation

@fnhirwa
Copy link

@fnhirwa fnhirwa commented Mar 18, 2024

What does this PR do?

The tests for tests/tests_pytorch/models/test_restore.py::test_load_model_from_checkpoint Were failing for me on macOS locally and I found out that there is a runtime error due to a comparison of two Tensors from different devices.
Just moving the pretrained model to the same device as the current model we are comparing with seems to fix the issue.

I thought it was a quick fix no need to open a github issue.
Thanks

Fixes #<issue_number>

Before submitting
  • Was this discussed/agreed 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 minor internal changes/refactors)

PR review

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

Reviewer checklist
  • 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

📚 Documentation preview 📚: https://pytorch-lightning--19668.org.readthedocs.build/en/19668/

@fnhirwa fnhirwa marked this pull request as ready for review March 18, 2024 10:43
@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Mar 18, 2024
@awaelchli awaelchli added tests community This PR is from the community labels Mar 18, 2024
@awaelchli awaelchli added this to the 2.2.x milestone Mar 18, 2024
@carmocca carmocca merged commit f4178d5 into Lightning-AI:master Mar 18, 2024
@mergify mergify bot added the ready PRs ready to be merged label Mar 18, 2024
awaelchli added a commit that referenced this pull request Apr 10, 2024
…efore assertion (#19668)

Co-authored-by: Felix Hirwa Nshuti <hirwanshutiflx@gmail.com>
lantiga pushed a commit that referenced this pull request Apr 11, 2024
…efore assertion (#19668)

Co-authored-by: Felix Hirwa Nshuti <hirwanshutiflx@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community This PR is from the community pl Generic label for PyTorch Lightning package ready PRs ready to be merged tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants