config
Batch
Bases: BatchSpec, TaskArrayMixin
Class to represent the entirety of the ensembler configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pre_batch
|
object
|
TaskArray configuration setup. |
None
|
pre_run
|
object
|
TaskArray configuration setup. |
None
|
post_run
|
object
|
TaskArray configuration setup. |
None
|
post_batch
|
object
|
TaskArray configuration setup. |
None
|
**kwargs
|
tuple
|
Keyword arguments for BatchSpec instance. |
{}
|
Source code in build/lib/model_ensembler/config.py
post_batch
property
Property decorator managing post batch tasks.
Returns:
| Type | Description |
|---|---|
list
|
Post batch tasks. |
post_run
property
Property decorator managing post run tasks.
Returns:
| Type | Description |
|---|---|
list
|
Post run tasks. |
pre_batch
property
Property decorator managing pre batch tasks.
Returns:
| Type | Description |
|---|---|
list
|
Pre batch tasks. |
pre_run
property
Property decorator managing pre run tasks.
Returns:
| Type | Description |
|---|---|
list
|
Pre run tasks. |
EnsembleConfig
Bases: YAMLConfig, TaskArrayMixin
Class to represent the entirety of the ensembler configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*args
|
tuple
|
See |
()
|
**kwargs
|
tuple
|
arbitrary keyword arguments. |
{}
|
Source code in build/lib/model_ensembler/config.py
batches
property
Property decorator managing batches contained in ensemble config.
Returns:
| Type | Description |
|---|---|
list
|
Batches contained in the ensemble configuration. |
post_process
property
Property decorator managing postprocessing attributes.
Returns:
| Type | Description |
|---|---|
list
|
Postprocessing Tasks. |
pre_process
property
Property decorator managing preprocessing attributes.
Returns:
| Type | Description |
|---|---|
list
|
Preprocessing Tasks. |
vars
property
Property decorator managing vars from the ensemble configuration.
Returns:
| Type | Description |
|---|---|
dict
|
vars from ensemble configuration. |
Task
TaskArrayMixin
Generates sets of Task objects from Batch object members
Source code in build/lib/model_ensembler/config.py
task_array(attr)
Yields Tasks from a configuration instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
attr
|
str
|
Name of the member property in the configuration that defines the list of Task objects. |
required |
Yields:
| Type | Description |
|---|---|
object
|
Task object |
Source code in build/lib/model_ensembler/config.py
YAMLConfig
Configuration processor for model-ensemble YAML-based configurations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
configuration
|
str
|
Name of the YAML configuration to load. |
required |
Source code in build/lib/model_ensembler/config.py
validate(json_schema, yaml_file)
staticmethod
Validate a YAML configuration against a JSON schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json_schema
|
str
|
Name of schema to validate against. |
required |
yaml_file
|
str
|
Name of the configuration to validate. |
required |
Returns:
| Type | Description |
|---|---|
tuple
|
contains JSON schema, YAML data. |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If "name" and "basedir" are specified in "batch_config:" instead of "batches:". |