Task models
Pydantic schemas for different task types.
| CLASS | DESCRIPTION |
|---|---|
CompoundTask |
A |
ConverterCompoundTask |
A |
ConverterNonParallelTask |
A |
NonParallelTask |
A |
ParallelTask |
A |
Classes¶
CompoundTask
pydantic-model
¶
Bases: _BaseTask
A CompoundTask object must include both executable_init and
executable attributes, and it may include the meta_init and meta
attributes.
Fields:
-
name(str) -
executable(str) -
meta(Optional[dict[str, Any]]) -
input_types(Optional[dict[str, bool]]) -
output_types(Optional[dict[str, bool]]) -
category(Optional[str]) -
modality(Optional[str]) -
tags(list[str]) -
docs_info(Optional[str]) -
executable_init(str) -
meta_init(Optional[dict[str, Any]]) -
type(Literal['compound'])
Source code in src/fractal_task_tools/task_models.py
ConverterCompoundTask
pydantic-model
¶
Bases: _BaseTask
A ConverterCompoundTask task is the same as a CompoundTask, but it
is executed differently in the Fractal backend.
Fields:
-
name(str) -
executable(str) -
meta(Optional[dict[str, Any]]) -
input_types(Optional[dict[str, bool]]) -
output_types(Optional[dict[str, bool]]) -
category(Optional[str]) -
modality(Optional[str]) -
tags(list[str]) -
docs_info(Optional[str]) -
executable_init(str) -
meta_init(Optional[dict[str, Any]]) -
type(Literal['converter_compound'])
Source code in src/fractal_task_tools/task_models.py
ConverterNonParallelTask
pydantic-model
¶
Bases: _BaseTask
A ConverterNonParallelTask task is the same as a NonParallelTask, but
it is executed differently in the Fractal backend.
Fields:
-
name(str) -
executable(str) -
meta(Optional[dict[str, Any]]) -
input_types(Optional[dict[str, bool]]) -
output_types(Optional[dict[str, bool]]) -
category(Optional[str]) -
modality(Optional[str]) -
tags(list[str]) -
docs_info(Optional[str]) -
type(Literal['converter_non_parallel'])
Source code in src/fractal_task_tools/task_models.py
NonParallelTask
pydantic-model
¶
Bases: _BaseTask
A NonParallelTask object must include the executable attribute, and it
may include the meta attribute.
Fields:
-
name(str) -
executable(str) -
meta(Optional[dict[str, Any]]) -
input_types(Optional[dict[str, bool]]) -
output_types(Optional[dict[str, bool]]) -
category(Optional[str]) -
modality(Optional[str]) -
tags(list[str]) -
docs_info(Optional[str]) -
type(Literal['non_parallel'])
Source code in src/fractal_task_tools/task_models.py
ParallelTask
pydantic-model
¶
Bases: _BaseTask
A ParallelTask object must include the executable attribute, and it may
include the meta attribute.
Fields:
-
name(str) -
executable(str) -
meta(Optional[dict[str, Any]]) -
input_types(Optional[dict[str, bool]]) -
output_types(Optional[dict[str, bool]]) -
category(Optional[str]) -
modality(Optional[str]) -
tags(list[str]) -
docs_info(Optional[str]) -
type(Literal['parallel'])
Source code in src/fractal_task_tools/task_models.py
_TaskList
¶
Bases: RootModel
List of valid tasks, with unique names.
Note: this model is only used for validation, and then discarded. If you
want to use its data, you should e.g. override the __iter__ and
__getitem__ methods. See
https://pydantic.dev/docs/validation/latest/concepts/models/#rootmodel-and-custom-root-types