-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add JSON export to Raw visualization #1485
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Neater than dumping to the console.
@@ -8,23 +10,13 @@ function RawVis(props: Props) { | |||
const { value } = props; | |||
const valueAsStr = JSON.stringify(value, null, 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step could be time consuming if value
is too big. I wonder if we could infer the size in another lighter way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I did wonder about that. On the other hand, the value
first has to be downloaded, which takes a lot more time than JSON.stringify
. Even in VS Code we have a 2GB limit on the size of the HDF5 file, so I'm not hugely concerned. Given that the raw vis is for datasets that have complicated dtypes, I'm not sure there's an easier way to approximate the size... So I'd prefer to wait for someone to hit this potential bottleneck before trying to fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me 👍
The
Raw
visualization now supports exporting datasets to JSON when using the h5grove, h5wasm and mock providers.This provides a much better solution to issue #917 than PR #1462 . As such, large raw datasets that can't be rendered on the screen are no longer logged to the console.
Concerning large datasets, I took the opportunity to do some more testing and decided to increase the threshold for when a dataset is considered to be large by a few orders of magnitude. This is purely empirical...