cubed.Spec#
- class cubed.Spec(work_dir=None, max_mem=None, allowed_mem=None, reserved_mem=0, executor=None, storage_options=None)#
Specification of resources available to run a computation.
- __init__(work_dir=None, max_mem=None, allowed_mem=None, reserved_mem=0, executor=None, storage_options=None)#
Specify resources available to run a computation.
- Parameters:
work_dir (str or None) – The directory path (specified as an fsspec URL) used for storing intermediate data.
max_mem (int, optional) – Deprecated. The maximum memory available to a worker for data use for the computation, in bytes.
allowed_mem (int or str, optional) –
The total memory available to a worker for running a task, in bytes.
If int it should be >=0. If str it should be of form <value><unit> where unit can be kB, MB, GB, TB etc. This includes any
reserved_mem
that has been set.reserved_mem (int or str, optional) –
The memory reserved on a worker for non-data use when running a task, in bytes.
If int it should be >=0. If str it should be of form <value><unit> where unit can be kB, MB, GB, TB etc.
executor (Executor, optional) – The default executor for running computations.
storage_options (dict, optional) – Storage options to be passed to fsspec.
Methods
__init__
([work_dir, max_mem, allowed_mem, ...])Specify resources available to run a computation.
Attributes
allowed_mem
The total memory available to a worker for running a task, in bytes.
executor
The default executor for running computations.
reserved_mem
The memory reserved on a worker for non-data use when running a task, in bytes.
storage_options
Storage options to be passed to fsspec.
work_dir
The directory path (specified as an fsspec URL) used for storing intermediate data.