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

Allow serialization of TensorInfo, and other safetensors classes #463

Open
LeoDog896 opened this issue Apr 6, 2024 · 7 comments
Open

Allow serialization of TensorInfo, and other safetensors classes #463

LeoDog896 opened this issue Apr 6, 2024 · 7 comments

Comments

@LeoDog896
Copy link

Feature request

Add missing derive traits for Serialize/Deserialize to TensorView (and other associated types missing these derivations)

Motivation

I am trying to return a safetensors view from its file format into JSON (for WASM bindings), and would like to not need to create a wrapper struct (especially when safetensors already imports Serde and uses its traits on a few select structs)

Your contribution

I can contribute with a PR, but I want this to be confirmed before I add it.

Copy link

github-actions bot commented May 7, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label May 7, 2024
@LeoDog896
Copy link
Author

Any opinion on this?

@github-actions github-actions bot removed the Stale label May 8, 2024
Copy link

github-actions bot commented Jun 7, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jun 7, 2024
@LeoDog896
Copy link
Author

.

@github-actions github-actions bot removed the Stale label Jun 8, 2024
Copy link

github-actions bot commented Jul 8, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jul 8, 2024
@LeoDog896
Copy link
Author

.

@github-actions github-actions bot removed the Stale label Jul 9, 2024
@Narsil
Copy link
Collaborator

Narsil commented Jul 31, 2024

Hi @LeoDog896 ,

Sorry for the long wait on this.

I do not understand the need for it. Why do you need to JSON representation of TensorView ?
I'm hesitant to add this, because TensorView doesn't own the data buffer, therefore converting it into JSON (or any serialization) would cause a large copy, which is not immediately obvious when manipulating this struct.

WASM target probably doesn't require JSON intermediary representation of the buffer, does it ?

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

No branches or pull requests

2 participants