Skip to content

Arrow Tensor logging with Image display#714

Merged
jondo2010 merged 14 commits intomainfrom
john/arrow_tensor
Jan 12, 2023
Merged

Arrow Tensor logging with Image display#714
jondo2010 merged 14 commits intomainfrom
john/arrow_tensor

Conversation

@jondo2010
Copy link
Copy Markdown
Contributor

@jondo2010 jondo2010 commented Jan 9, 2023

image

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I've added a line to CHANGELOG.md (if this is a big enough change to warrant it)

Partially closes #517, #522

#[derive(Debug, ArrowField, ArrowSerialize, ArrowDeserialize)]
#[arrow_field(type = "dense")]
pub enum TensorData {
U8(Vec<u8>),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Using a Vec here makes sense for the short-term so you don't have to jump through as many serializer hoops, but we definitely want a TODO here to just hang onto the underlying arrow2::Buffer<T> directly. That way we can refer to the same Arc'd data from the store and should be able to do this mostly zero-copy.

@jondo2010 jondo2010 mentioned this pull request Jan 12, 2023
3 tasks
Copy link
Copy Markdown
Contributor

@jleibs jleibs left a comment

Choose a reason for hiding this comment

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

That one was a bit of a slog. Nice work!

Comment on lines 32 to +33
pub fn as_ndarray<A: bytemuck::Pod + TensorDataTypeTrait>(
tensor: &Tensor,
tensor: &ClassicTensor,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

TODO: Make this work with TensorTrait?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The new Tensor already provides to/from conversions for ndarray

@jondo2010 jondo2010 merged commit c6399ad into main Jan 12, 2023
@jondo2010 jondo2010 deleted the john/arrow_tensor branch January 12, 2023 15:41
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.

Support logging Tensors with Arrow store

3 participants