Getting rid of torch._six
(for future PyTorch versions)
#486
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, I understand this library currently supports PyTorch version:
1.8.*
but as we move along, and Open3D decided to support newer versions of PyTorch, it would help if we can get rid oftorch._six
completely.Why is this needed?
So I faced this problem where I was testing a code which uses this library. The errors that I got were first related to
torch._six
.Had to dig around to find, that
torch._six
had removed this from their library. Makes sense, since the community has started moving to Python 3.x versions.Once these fixes were done, it gave me a clearer error that I was just using a newer version of PyTorch:
I think, it would be good if we get rid of
torch._six
completely, and use better alternatives, so that a user using inappropriate version of PyTorch gets a clear error instead oftorch._six
import errors.This change is
cc: @sanskar107