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

feat: to/from PyTorch JaggedTensor #3246

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

maxymnaumchyk
Copy link
Collaborator

No description provided.

Copy link

codecov bot commented Sep 17, 2024

Codecov Report

Attention: Patch coverage is 22.22222% with 49 lines in your changes missing coverage. Please review.

Project coverage is 81.94%. Comparing base (b749e49) to head (000e10a).
Report is 158 commits behind head on main.

Files with missing lines Patch % Lines
src/awkward/operations/ak_to_jaggedtensor.py 20.96% 49 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
src/awkward/operations/__init__.py 100.00% <100.00%> (ø)
src/awkward/operations/ak_to_jaggedtensor.py 20.96% <20.96%> (ø)

... and 105 files with indirect coverage changes

@maxymnaumchyk
Copy link
Collaborator Author

@jpivarski should I also leave out a "keep_regular" parameter since it does the same as ak.from_regular()? It's kind of the same situation we talked about today (about "padded" parameter).

@jpivarski
Copy link
Member

You're right: it is. The situation is that we should be providing an interface to the user that's like Lego bricks that they can put together however they like. If there's an alternative way of doing something, it shouldn't be a feature of the new functions, because then we'd have to explain why someone would use one or the other.

I agree that the padded and keep_regular arguments are more convenient if that's exactly what someone wants; passing padded=True or keep_regular=True is easier than the multi-step process it would be with the other method. However, these shortcuts would only work in the cases that these functions apply to, which are limited by the capabilities of TensorFlow and PyTorch's ragged array implementations.

@maxymnaumchyk
Copy link
Collaborator Author

thanks for such a detailed answer!

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

Successfully merging this pull request may close these issues.

2 participants