Skip to content

Cubed with coiled executor example clarification #803

@norlandrhagen

Description

@norlandrhagen

Hey there @tomwhite,

I was interesting in trying cubed for rechunking using the coiled executor. This works fine, but I don't see any coiled functions created in the coiled dashboard. Wondering if there is some additional config I need?

Edit: Adding from_array_kwargs={"spec": spec} seemed to fix it!

MRE

# cubed_version: '0.22.0'
# coiled_version: '1.120.0'
# xarray_version: '2025.9.0'


import xarray as xr
import cubed 

spec = cubed.Spec(
    work_dir="s3://cmy-bucket/cubed/scratch",
    allowed_mem="2GB",
    executor_name="coiled",
    executor_options={'coiled_kwargs':{'vm_type':'m8g.large'}}
)

ds = xr.tutorial.open_dataset(
    "air_temperature", chunked_array_type="cubed", from_array_kwargs={"spec": spec} 
)
del ds.air.encoding['chunks']

rds = ds.chunk({'time':1}, chunked_array_type="cubed",from_array_kwargs={"spec": spec} )
rds.to_zarr("s3://my-bucket/cubed/air.zarr", mode="w", consolidated=False)

The cubed docs are looking great by the way!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions