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

Adding support for Arrow List(*) for Python #337

Merged
merged 7 commits into from
Aug 14, 2023
Merged

Adding support for Arrow List(*) for Python #337

merged 7 commits into from
Aug 14, 2023

Conversation

haixuanTao
Copy link
Collaborator

@haixuanTao haixuanTao commented Aug 12, 2023

This is an intermediate Pull Request in supporting more types. that makes it possible to send all basic types (i16, f32, u64...) when using python API.

The main idea is to refactor the Metadata struct to allow it to pass a data_type field specifying the type. This type is then used when constructing the arrow array.

This work for dora Python Node API and dora Python Operator API.

I have also added a small optimization that makes removes a round trip from the Python Operator to the Runtime if the vector is smaller than shared memory.

To test

You can check the newly updated python-operator-example where np.uint8 downcasting has been removed and the type is passed through the dora event message.

Copy link
Collaborator

@phil-opp phil-opp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks a lot!

@haixuanTao haixuanTao merged commit be3f1d4 into main Aug 14, 2023
31 checks passed
@haixuanTao haixuanTao deleted the more-type branch August 14, 2023 10:22
@haixuanTao haixuanTao mentioned this pull request Sep 6, 2023
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.

None yet

2 participants