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

Ensure safe_to_tensor moves tensors to the specified device. #831

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ernestum
Copy link
Collaborator

@ernestum ernestum commented Dec 15, 2023

This PR fixes a bug in the safe_to_tensor utility: previously it did not move tensors to a new device according to the device kwarg which caused issues when there is more than one device available.
The bug went unnoticed for a long while since our circleCI runners do not have GPUs enabled.

Thanks to @tomtseng for drafting a fix for this in #828

Copy link

codecov bot commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a8b079c) 95.69% compared to head (7e618b0) 95.71%.

❗ Current head 7e618b0 differs from pull request most recent head 2cfd7f1. Consider uploading reports for the commit 2cfd7f1 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #831      +/-   ##
==========================================
+ Coverage   95.69%   95.71%   +0.02%     
==========================================
  Files         102      102              
  Lines        9645     9646       +1     
==========================================
+ Hits         9230     9233       +3     
+ Misses        415      413       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ernestum
Copy link
Collaborator Author

I think the coverage warning in this one is spurious. Can you merge this @AdamGleave ?

@AdamGleave
Copy link
Member

I think the coverage warning in this one is spurious. Can you merge this @AdamGleave ?

Looks like the issue is that test_sqil_performance_continuous is being skipped. This is going to continue to cause a problem in all subsequent PRs requiring manual override -- we try and enforce 100% test coverage to make sure nothing is being unintentionally not run. I think you can just add a # pragma: no cover to fix this. If that doesn't work LMK and I can try to troubleshoot.

@dominikonysz
Copy link

Hello, what's the state of this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants