-
Notifications
You must be signed in to change notification settings - Fork 54
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
Fix: ht.array
constructor respects implicit torch device when copy is set to false
#1363
Fix: ht.array
constructor respects implicit torch device when copy is set to false
#1363
Conversation
Thank you for the PR! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1363 +/- ##
==========================================
- Coverage 92.06% 92.05% -0.01%
==========================================
Files 80 80
Lines 11942 11950 +8
==========================================
+ Hits 10994 11001 +7
- Misses 948 949 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thank you for tackling this issue @JuanPedroGHM. I created a table of the allowed parameter combinations for clarity:
What do you think? |
So I did a bit of a brute force grid search and found all this instances that to me are incorrect behavior from heat. Let me know what you think: Current inconsistent behavior (Summary):
Attached is also a full table with the data. |
Thank you for the PR! |
Thank you for the PR! |
Changes:
New table: |
…eter_combinations_copy_&_split
Thank you for the PR! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @JuanPedroGHM, I made some suggestions for better understanding.
… objt Co-authored-by: Michael Tarnawa <m.tarnawa@fz-juelich.de>
for more information, see https://pre-commit.ci
Thank you for the PR! |
…eter_combinations_copy_&_split
Thank you for the PR! |
Thank you for the PR! |
Thank you for the PR! |
…eter_combinations_copy_&_split
Thank you for the PR! |
…eter_combinations_copy_&_split
Thank you for the PR! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my point of view this looks fine; in particular, I guess that the additional error messages will be very helpful (in particular since I have already made a mistake regarding split and is_split myself).
Thanks 👍
…eter_combinations_copy_&_split
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @JuanPedroGHM .
The CI matrix must be updated here before we can merge.
Also, just to be safe, can you test that the tutorials still behave as expected after these changes? Internals would be a good one to check (also feel free to add content there, I don't think we've addressed the copy
attribute at all).
Thanks again!
Thank you for the PR! |
Thanks for the suggestion @ClaudiaComito ! I ran the tutorial (on my laptop, so single gpu and without the datasets) and they ran perfectly. I did find one error in the internals tutorial with an undefined variable "target_map", which I corrected with the last commit. I also added a small example to the interoperability section in tutorial 2 about using the copy keyword. |
Thank you for the PR! |
Thank you for the PR! |
…eter_combinations_copy_&_split
Thank you for the PR! |
…eter_combinations_copy_&_split
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again, next try...
Thank you for the PR! |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/1.3.x
git worktree add -d .worktree/backport-1363-to-release/1.3.x origin/release/1.3.x
cd .worktree/backport-1363-to-release/1.3.x
git switch --create backport-1363-to-release/1.3.x
git cherry-pick -x b1203e745f5045537794c6581728c78444d29776 f1b568b323680ecf84b312a0355ea6061d7398bc 5525bb6f5d1b415672bc3a9ec96bac933c18ce5e b1ef6f95547493133f8f650a42b5ed6fe12097fb 3a97d5f9dae0457c1bc0a32670d3ed6349bf20e0 6f878faf1f8565ca5ad745a38c90891cf8d7caf7 c5052008fc70093c6cd98282ade4da3052c092d2 dffa4fad0141a90adaa8c9858d307d7e99c84a58 a84ba76fae2ee107ba71e898f73b7e1babbe4043 |
Due Diligence
Description
ht.array
constructor deleted original object torch device when the copy flag is set to False.Issue/s resolved: #1321
Changes proposed:
ht.array
factory for the original object's device.ht.array
using torch tensor, on different devices (when changing the env variable), and with copy set to false.Type of change
Does this change modify the behaviour of other functions? If so, which?
yes?