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

[WIP] Tf.data pipeline #1087

Merged
merged 25 commits into from
Jul 27, 2023
Merged

[WIP] Tf.data pipeline #1087

merged 25 commits into from
Jul 27, 2023

Conversation

eddyxu
Copy link
Contributor

@eddyxu eddyxu commented Jul 24, 2023

No description provided.

@eddyxu eddyxu added WIP work in progress donotmerge Do not merge donotreview labels Jul 24, 2023
@eddyxu eddyxu self-assigned this Jul 24, 2023
@eddyxu eddyxu force-pushed the lei/tf_data branch 2 times, most recently from 2060acb to 37649cf Compare July 24, 2023 20:18
@eddyxu eddyxu added Tensorflow Tensorflow support python and removed donotmerge Do not merge donotreview labels Jul 25, 2023
@eddyxu eddyxu marked this pull request as ready for review July 25, 2023 23:01
python/python/lance/tf/data.py Show resolved Hide resolved
python/python/lance/tf/data.py Outdated Show resolved Hide resolved
python/python/lance/tf/data.py Show resolved Hide resolved
python/python/lance/tf/data.py Outdated Show resolved Hide resolved
python/python/tests/test_tf.py Outdated Show resolved Hide resolved
@eddyxu eddyxu removed the WIP work in progress label Jul 26, 2023
if isinstance(tensor_spec, tf.RaggedTensorSpec):
return tf.ragged.constant(column, dtype=tensor_spec.dtype)
else:
return tf.constant(column, dtype=tensor_spec.dtype)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there any docs on how this works? We can just pass arrow arrays into tf.constant and tensorflow understands arrow? Or is there some other protocol here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://www.tensorflow.org/tutorials/customization/basics#numpy_compatibility it is not yet clear to me that this is a zero copy operation yet.

Let's digg more in implementation details as follow up? Wanted to get the API spec out for now.

@eddyxu eddyxu merged commit 33e985f into main Jul 27, 2023
@eddyxu eddyxu deleted the lei/tf_data branch July 27, 2023 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Tensorflow Tensorflow support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants