Praveen Kulkarni commited on
Commit ·
d679da5
1
Parent(s): a05f582
utf8 encoding
Browse files
test.py
CHANGED
|
@@ -95,23 +95,22 @@ class ZarrTest:
|
|
| 95 |
from zarr.storage import FSStore
|
| 96 |
store = FSStore('hf://datasets/spikingneurons/test/data.zarr')
|
| 97 |
root = zarr.group(store=store)
|
|
|
|
| 98 |
# store = FSStore('zip://*::hf://datasets/spikingneurons/test/example.zip')
|
| 99 |
# store11 = FSStore('zip://hf://datasets/spikingneurons/test/example.zip')
|
| 100 |
# store22 = FSStore('zip+hf://datasets/spikingneurons/test/example.zip')
|
| 101 |
# store = zarr.DirectoryStore(UPath('hf://datasets/spikingneurons/test') / 'data.zarr')
|
| 102 |
# store1 = zarr.DirectoryStore('data.zarr')
|
| 103 |
# root1 = zarr.group(store=store1)
|
| 104 |
-
with fsspec.open('hf://datasets/spikingneurons/test/
|
| 105 |
_zip_fs = ZipFileSystem(zip_file)
|
| 106 |
store4 = FSStore(url="", fs=_zip_fs)
|
| 107 |
-
root4 = zarr.
|
| 108 |
-
print(root4['
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
ZarrTest.
|
| 112 |
-
ZarrTest.
|
| 113 |
-
# ZarrTest.load_from_hf()
|
| 114 |
-
# ZarrTest.load_zip_partially_from_hf()
|
| 115 |
|
| 116 |
class Test(datasets.GeneratorBasedBuilder):
|
| 117 |
VERSION = datasets.Version("1.0.0")
|
|
|
|
| 95 |
from zarr.storage import FSStore
|
| 96 |
store = FSStore('hf://datasets/spikingneurons/test/data.zarr')
|
| 97 |
root = zarr.group(store=store)
|
| 98 |
+
print(root['trace'][:])
|
| 99 |
# store = FSStore('zip://*::hf://datasets/spikingneurons/test/example.zip')
|
| 100 |
# store11 = FSStore('zip://hf://datasets/spikingneurons/test/example.zip')
|
| 101 |
# store22 = FSStore('zip+hf://datasets/spikingneurons/test/example.zip')
|
| 102 |
# store = zarr.DirectoryStore(UPath('hf://datasets/spikingneurons/test') / 'data.zarr')
|
| 103 |
# store1 = zarr.DirectoryStore('data.zarr')
|
| 104 |
# root1 = zarr.group(store=store1)
|
| 105 |
+
with fsspec.open('hf://datasets/spikingneurons/test/data.zarr.zip', 'rb', fs=HfFileSystem()) as zip_file:
|
| 106 |
_zip_fs = ZipFileSystem(zip_file)
|
| 107 |
store4 = FSStore(url="", fs=_zip_fs)
|
| 108 |
+
root4 = zarr.open_consolidated(store=store4)
|
| 109 |
+
print(root4['trace'][:])
|
| 110 |
+
|
| 111 |
+
# ZarrTest.create()
|
| 112 |
+
# ZarrTest.create_in_zip()
|
| 113 |
+
ZarrTest.load_from_hf()
|
|
|
|
|
|
|
| 114 |
|
| 115 |
class Test(datasets.GeneratorBasedBuilder):
|
| 116 |
VERSION = datasets.Version("1.0.0")
|