Replies: 1 comment
-
|
I was able to get it working, but only after a significant amount of trial and error. I feel there has to be an easier way. async def combine_zarrs_async(paths, refs):
def run_multizarr():
mzz = MultiZarrToZarr(
paths,
indicts = refs,
concat_dims=["time"]
)
return mzz.translate()
combined_ref = await asyncio.to_thread(run_multizarr)
return combined_ref
async def zarr_mfdataset(files):
refs = []
for rj in fsspec.open_files(files, compression='zstd', protocol='s3'):
with rj.open() as fin:
refs.append(json.load(fin))
combined = await combine_zarrs_async(files, refs)
return combined |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When attempting to use MultiZarrToZarr (kerchunk v0.2.9 with python 3.11/3.14, fsspec 2025.9.0) to combine a set of json files into a single zarr store, I consistently get errors from asyncio that the loop is not running. Am I missing something, or is there something missing from the documentation? Is there a specific way I need invoke the translate() method? As far as I can tell, the kerchunk documentation doesn't mention asyncio anywhere.
This snippet is being run from a script, an ipython console, and a jupyter notebook. In all 3 cases I get the same error.
Beta Was this translation helpful? Give feedback.
All reactions