GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||
GeezerVison is showing github.com — fix: fix deepcopy torchtensor by JoanFM · Pull Request #1720 · docarray/docarray
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
Conversation
|
There was an error while loading. Please reload this page.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@ ## main #1720 +/- ## ========================================== + Coverage 84.84% 85.56% +0.72% ========================================== Files 133 133 Lines 8583 8585 +2 ========================================== + Hits 7282 7346 +64 + Misses 1301 1239 -62
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: Joan Fontanals Martinez <[email protected]>
2d79034 to
7b1384b
Compare
|
📝 Docs are deployed on https://ft-fix-torch-tensor-deepcopy--jina-docs.netlify.app 🎉 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| """cast itself to a numpy array""" | ||
| return self.detach().cpu().numpy() | ||
|
|
||
| def new_empty(self, *args, **kwargs): |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
can we copy the full signature of the original method ?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
if it is always the same, I do not think it makes sense, this is way more mantainable
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
But this break everything related to mypy and pycharm feature. In DocArray v2 we always repeat the full signature of the function
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
but mypy check passes
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The method on TorchEmbedding does the same.
This is a method that noone should use
It is easier to forget to update this method than anything else.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
okay oaky
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
mypy pass because it does not look at it. It will only check if there is type hint
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
TorchTensor cannot be deep copied.
There was an error while loading. Please reload this page.