eogrow.core.schemas

Module defining a base pipeline schema and custom fields

For each pipeline a separate schema has to be defined which inherits from PipelineSchema. Such schema should be placed as an internal class of the implemented pipeline class

pydantic model eogrow.core.schemas.ManagerSchema[source]

Bases: Schema

A basic schema for managers, to be used as a parent class for defining manager schemas

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Fields:
field manager: str | None = None

An import path to this specific manager.

pydantic model eogrow.core.schemas.PipelineSchema[source]

Bases: Schema

Base schema of the Pipeline class.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Fields:
field area: ManagerSchema [Required]

A schema of an implementation of AreaManager class

Validated by:
field debug: bool = False

Run pipeline without the ray wrapper to enable debugging.

field logging: ManagerSchema [Required]

A schema of an implementation of LoggingManager class

Validated by:
field pipeline: str | None = None

Import path to an implementation of Pipeline class.

field pipeline_name: str | None = None

Custom pipeline name for easier identification in logs. By default the class name is used.

field raise_on_failure: bool = True

Raise an exception if run_procedure returns some executions in failed.

field raise_on_temporal_mismatch: bool = False

Treat TemporalDimensionWarning as an exception during EOExecution.

field skip_existing: bool = False

Whether or not to skip already processed patches. In order to use this functionality a pipeline must implement the filter_patch_list method.

field storage: ManagerSchema [Required]

A schema of an implementation of StorageManager class

Validated by:
field test_subset: List[int | str] | None = None

A list of EOPatch indices and/or names for which the pipeline is executed. Used for testing, can be set through CLI with the -t flag.

field worker_resources: Dict[str, Any] [Optional]

Keyword arguments passed to ray tasks when executing via RayExecutor. The options are specified [here](https://docs.ray.io/en/latest/ray-core/api/doc/ray.remote_function.RemoteFunction.options.html).

eogrow.core.schemas.build_schema_template(schema, required_only=False, pipeline_import_path=None, add_descriptions=False)[source]
Parameters:
  • schema (type[pydantic.main.BaseModel]) –

  • required_only (bool) –

  • pipeline_import_path (str | None) –

  • add_descriptions (bool) –

Return type:

dict