-
Notifications
You must be signed in to change notification settings - Fork 463
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
Binary serialization #684
Binary serialization #684
Conversation
684f139
to
b95f218
Compare
@maartenbreddels I tested all the marks, the list is below. One problem is that arrays of text (e.g. for Label and MarketMap) are not handled by the binary serializer, they should be changed to the 'classic' one. I haven't looked into the JS errors for the other Marks though... Work
Don't work (serializing error because data is not float/int/date)
Don't work (JS error)
|
Ok, I've looked into it, and in many places there is the expectation that the data can be 2d, but of irregular shape. That means that you can't really convert it to a numpy array (ok, of type object).
So it depends if we wanna solve this completely now, or have some results now quickly, and iterate later on. Thoughts @SylvainCorlay ? |
b95f218
to
7406946
Compare
Discussed this with Sylvain, the support for irregular arrays was an accident, and there are two options:
I'll go for the first option first, and then when everything seems to work, I'll work on the 2nd item. |
In any case, the "fill with nan" thingy would be a backend change only. |
d1809f1
to
71318c6
Compare
It's 90% done I think. I check many of the notebooks, and there are only a few issues (non-breaking). I think we can totally can get rid of |
365aa50
to
3bc319a
Compare
4801435
to
f996246
Compare
Continues from #680 (if that is merged I'll rebase)This adds binary serialization to many of the Marks (scatter and line seems to work).
Lines
Label
(and check other text arrays)Bars
Bins
Boxplot
Candles
GridHeatMap
HeatMap
Hist
MarketMap
Pie
BaseModel
andget_typed_field/set_typed_field
Since some of the code is coming from ipyvolume, I left in support for 'keyframes', i.e. the data arrays can be or one dimension higher, allowing for full frontend based animation. Do we want to go that route?
Also, do we want to use ndarray? For 1d arrays I'm fine with TypedArrays for now.