Praveen Kulkarni
commited on
Commit
·
93fe4fb
1
Parent(s):
d679da5
utf8 encoding
Browse files
test.py
CHANGED
|
@@ -87,9 +87,9 @@ class ZarrTest:
|
|
| 87 |
import datasets
|
| 88 |
# ds = load_dataset("spikingneurons/test", streaming=True, trust_remote_code=True)
|
| 89 |
# print(ds)
|
| 90 |
-
_fs = HfFileSystem()
|
| 91 |
-
_files = _fs.ls("datasets/spikingneurons/test", detail=False)
|
| 92 |
-
print(_files)
|
| 93 |
# import xarray as xr
|
| 94 |
# _arr = xr.open_dataset('hf://datasets/spikingneurons/test/data.zarr', engine='zarr', chunks={})
|
| 95 |
from zarr.storage import FSStore
|
|
@@ -102,7 +102,7 @@ class ZarrTest:
|
|
| 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'
|
| 106 |
_zip_fs = ZipFileSystem(zip_file)
|
| 107 |
store4 = FSStore(url="", fs=_zip_fs)
|
| 108 |
root4 = zarr.open_consolidated(store=store4)
|
|
|
|
| 87 |
import datasets
|
| 88 |
# ds = load_dataset("spikingneurons/test", streaming=True, trust_remote_code=True)
|
| 89 |
# print(ds)
|
| 90 |
+
# _fs = HfFileSystem()
|
| 91 |
+
# _files = _fs.ls("datasets/spikingneurons/test", detail=False)
|
| 92 |
+
# print(_files)
|
| 93 |
# import xarray as xr
|
| 94 |
# _arr = xr.open_dataset('hf://datasets/spikingneurons/test/data.zarr', engine='zarr', chunks={})
|
| 95 |
from zarr.storage import FSStore
|
|
|
|
| 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') as zip_file:
|
| 106 |
_zip_fs = ZipFileSystem(zip_file)
|
| 107 |
store4 = FSStore(url="", fs=_zip_fs)
|
| 108 |
root4 = zarr.open_consolidated(store=store4)
|