fl_server_ai.notification.training.round_start ¶
Classes:
| Name | Description |
|---|---|
TrainingRoundStartNotification | Notification for the start of a training round. |
Functions:
| Name | Description |
|---|---|
training_notification_callback_failure | Callback that logs a failed training notification. |
training_notification_callback_success | Callback that logs a successful training notification. |
Attributes¶
Classes¶
TrainingRoundStartNotification dataclass ¶
Bases: TrainingNotification['TrainingRoundStartNotification.Body']
flowchart TD
fl_server_ai.notification.training.round_start.TrainingRoundStartNotification[TrainingRoundStartNotification]
fl_server_ai.notification.training.training.TrainingNotification[TrainingNotification]
fl_server_ai.notification.notification.Notification[Notification]
fl_server_ai.notification.serializable.Serializable[Serializable]
fl_server_ai.notification.training.training.TrainingNotification --> fl_server_ai.notification.training.round_start.TrainingRoundStartNotification
fl_server_ai.notification.notification.Notification --> fl_server_ai.notification.training.training.TrainingNotification
fl_server_ai.notification.serializable.Serializable --> fl_server_ai.notification.notification.Notification
click fl_server_ai.notification.training.round_start.TrainingRoundStartNotification href "" "fl_server_ai.notification.training.round_start.TrainingRoundStartNotification"
click fl_server_ai.notification.training.training.TrainingNotification href "" "fl_server_ai.notification.training.training.TrainingNotification"
click fl_server_ai.notification.notification.Notification href "" "fl_server_ai.notification.notification.Notification"
click fl_server_ai.notification.serializable.Serializable href "" "fl_server_ai.notification.serializable.Serializable"
Notification for the start of a training round.
- API Reference
fl_server_ainotificationtraining
Classes:
| Name | Description |
|---|---|
Body | Inner class representing the body of the notification. |
Methods:
| Name | Description |
|---|---|
from_training | Create a |
Attributes:
| Name | Type | Description |
|---|---|---|
callback_error | Signature | None | |
callback_success | Signature | None | |
type | NotificationType | The type of the notification. |
Source code in fl_server_ai/notification/training/round_start.py
Attributes¶
type class-attribute instance-attribute ¶
type: NotificationType = UPDATE_ROUND_START
The type of the notification.
Classes¶
Body dataclass ¶
Bases: Serializable
flowchart TD
fl_server_ai.notification.training.round_start.TrainingRoundStartNotification.Body[Body]
fl_server_ai.notification.serializable.Serializable[Serializable]
fl_server_ai.notification.serializable.Serializable --> fl_server_ai.notification.training.round_start.TrainingRoundStartNotification.Body
click fl_server_ai.notification.training.round_start.TrainingRoundStartNotification.Body href "" "fl_server_ai.notification.training.round_start.TrainingRoundStartNotification.Body"
click fl_server_ai.notification.serializable.Serializable href "" "fl_server_ai.notification.serializable.Serializable"
Inner class representing the body of the notification.
Methods:
| Name | Description |
|---|---|
__init__ | |
Attributes:
| Name | Type | Description |
|---|---|---|
global_model_uuid | UUID | The UUID of the global model. |
round | int | The round number. |
Source code in fl_server_ai/notification/training/round_start.py
Functions¶
from_training classmethod ¶
Create a TrainingRoundStartNotification instance from a training object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
| Training | The training object to create the notification from. | required |
Returns:
| Name | Type | Description |
|---|---|---|
TrainingRoundStartNotification | The created notification. |
Source code in fl_server_ai/notification/training/round_start.py
Functions¶
training_notification_callback_failure ¶
training_notification_callback_failure(exception: NotificationException, training_uuid: UUID)
Callback that logs a failed training notification.
Also sets the training to an error state if the exception is not a client rejection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
| NotificationException | The exception that occurred. | required |
| UUID | The UUID of the training. | required |
Source code in fl_server_ai/notification/training/round_start.py
training_notification_callback_success ¶
training_notification_callback_success(receiver: NotificationReceiver, training_uuid: UUID)
Callback that logs a successful training notification.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
| NotificationReceiver | The receiver of the notification. | required |
| UUID | The UUID of the training. | required |