Closed loichuder closed 5 months ago
Ha, so it works if you first select data_compressed
and then data_compressed_via_vds
but not if you select data_compressed_via_vds
right away.
It's because the virtual compressed dataset's filters
metadata doesn't "mirror" the source dataset's filters
metadata as it should. So vscode-h5web (or myHDF5) doesn't know that it needs to load the bitshuffle plugin.
I'll report on the h5wasm repo.
Ha, so it works if you first select
data_compressed
and thendata_compressed_via_vds
but not if you select data_compressed_via_vds right away.
Ha! That's why I thought it worked in the h5wasm
demo: it did work because I selected data_compressed
first. Just retried: if I select data_compressed_via_vds
first, I get the same error I report here.
It's because the virtual compressed dataset's filters metadata doesn't "mirror" the source dataset's filters metadata as it should.
I'm not sure, you can make a virtual dataset which gives access to multiple datasets stored with different compression filters... (Never seen this though)
I'm not sure, you can make a virtual dataset which gives access to multiple datasets stored with different compression filters
You can. The following snippet works without trouble:
import numpy
import h5py
import hdf5plugin
with h5py.File("double_filter_vds.h5", "w") as h5file:
data = numpy.linspace(0, 10, 100)
c_dset = h5file.create_dataset(
"bitshuffle", data=data, **hdf5plugin.Bitshuffle(cname="lz4")
)
c_dset_2 = h5file.create_dataset("blosc", data=data, **hdf5plugin.Blosc2())
vlayout = h5py.VirtualLayout(shape=(200,), dtype=dset.dtype)
vsource = h5py.VirtualSource(dset)
vlayout[:100] = vsource[:]
vsource2 = h5py.VirtualSource(dset)
vlayout[100:] = vsource2[:]
h5file.create_virtual_dataset("data_via_vds", vlayout)
I'm not sure, you can make a virtual dataset which gives access to multiple datasets stored with different compression filters... (Never seen this though)
Yep, Brian mentioned this as well: https://github.com/usnistgov/h5wasm/issues/75#issuecomment-2144936429 — he already released a new version of h5wasm that exposes virtual sources in the metadata.
Should now be fixed in v0.1.6 of the extension.
Describe the bug
Ok, this one is a stretch. Thanks to https://github.com/silx-kit/h5web/pull/1524, it is now possible to read datasets compressed with
bitshuffle
. But when creating a Virtual dataset pointing such a dataset, I get the following error:Full traceback
To Reproduce
data_compressed
(a 1D dataset compressed with bitshuffle): it displays finedata_via_vds
(a VDS pointing to non-compressed datasetdata
): it displays finedata_compressed_via_vds
(you get it)vds_bug.zip
Expected behaviour
It should be able to display compressed datasets, even through a VDS. Interestingly, the h5wasm demo seems to display it fine ?
Context