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

[question] serialization of label indices #16

Open
xiuliren opened this issue Jul 4, 2023 · 2 comments
Open

[question] serialization of label indices #16

xiuliren opened this issue Jul 4, 2023 · 2 comments

Comments

@xiuliren
Copy link

xiuliren commented Jul 4, 2023

is there a function to serialize and deserialize the label indices?
Currently, I am using pickle to do it.

@xiuliren xiuliren changed the title serialization of label indices [question] serialization of label indices Jul 4, 2023
@stuarteberg
Copy link
Member

stuarteberg commented Jul 4, 2023

I don’t typically save them to disk. But DVID uses prorogued protobuf to send/receive them. You could use that, I suppose. (See the imports at the top of _labelindex.py) Not sure if it’s any better than pickle, though.

Another option is to convert them to pandas DataFrames (and back), but then you have to handle a few metadata fields yourself (mutid, lastmod).

(Sorry for not giving links. Typing from my phone.)

@stuarteberg
Copy link
Member

Oops, that was supposed to say protobuf! (Sorry, phone typo.)

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