Alerter
Alerters allow you to send alerts from within your pipeline.
This is useful to immediately get notified when failures happen, and also for general monitoring / reporting.
BaseAlerter
Bases: StackComponent, ABC
Base class for all ZenML alerters.
Source code in src/zenml/alerter/base_alerter.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | |
config
property
Returns the BaseAlerterConfig config.
Returns:
| Type | Description |
|---|---|
BaseAlerterConfig
|
The configuration. |
ask(question, params=None)
Post a message to a chat service and wait for approval.
This can be useful to easily get a human in the loop, e.g., when deploying models.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
question
|
str
|
Question to ask (message to be posted). |
required |
params
|
Optional[BaseAlerterStepParameters]
|
Optional parameters of this function. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if operation succeeded and was approved, else False. |
Source code in src/zenml/alerter/base_alerter.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | |
post(message, params=None)
Post a message to a chat service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
Message to be posted. |
required |
params
|
Optional[BaseAlerterStepParameters]
|
Optional parameters of this function. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if operation succeeded, else False. |
Source code in src/zenml/alerter/base_alerter.py
46 47 48 49 50 51 52 53 54 55 56 57 58 | |
BaseAlerterConfig
Bases: StackComponentConfig
Base config for alerters.
Source code in src/zenml/alerter/base_alerter.py
30 31 | |
BaseAlerterFlavor
Bases: Flavor, ABC
Base class for all ZenML alerter flavors.
Source code in src/zenml/alerter/base_alerter.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | |
config_class
property
Returns BaseAlerterConfig class.
Returns:
| Type | Description |
|---|---|
Type[BaseAlerterConfig]
|
The BaseAlerterConfig class. |
implementation_class
property
type
property
BaseAlerterStepParameters
Bases: BaseModel
Step parameters definition for all alerters.
Source code in src/zenml/alerter/base_alerter.py
26 27 | |