runners
run_check(func, check)
async
Run a check configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
func
|
callable
|
Async check method. |
required |
check
|
dict
|
Check configuration. |
required |
Raises:
| Type | Description |
|---|---|
CheckException
|
Any exception from the called check. |
Source code in build/lib/model_ensembler/runners.py
run_runner(limit, tasks)
async
Runs a list of tasks asynchronously.
Given a particular limit, establish a semaphore and run up to limit tasks. Once the list of tasks is complete, return.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int
|
Context object for retrieving configuration. |
required |
tasks
|
list
|
Tasks and checks. |
required |
Returns:
| Type | Description |
|---|---|
list
|
Completed tasks. |
Source code in build/lib/model_ensembler/runners.py
run_task(func, task)
async
Run a task configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_ctx
|
object
|
Context object for retrieving configuration. |
required |
task
|
dict
|
Task configuration. |
required |
Raises:
| Type | Description |
|---|---|
TaskException
|
Any exception from the called task. |
Returns:
| Type | Description |
|---|---|
bool
|
True if task runs without exception. |
Source code in build/lib/model_ensembler/runners.py
run_task_items(items)
async
Run a set of task and checks.
Run the list of tasks and check items, the configuration references the
model_ensemble.tasks method to use and the context/configuration
provides the arguments. TaskException and CheckException are trapped and
rethrown as ProcessingException.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
items
|
list
|
Tasks and checks. |
required |
Raises:
| Type | Description |
|---|---|
ProcessingException
|
A common exception thrown for failures in the individual tasks. |