Processes
ProgressTaskCallable
¶
Bases: Protocol
Protocol for functions decorated with progress_task.
ResultProcess
¶
Bases: PipelineProcess
ResultProcess is a class that handles the logging of images and their corresponding masks during the training, validation, and testing phases of a machine learning pipeline.
Attributes:
| Name | Type | Description |
|---|---|---|
progress_manager |
An instance of the progress manager obtained from the manager. |
|
total_epochs |
The total number of epochs configured in wandb. |
|
train_images_indices |
A list of indices for the training images. |
|
val_images_indices |
A list of indices for the validation images. |
|
test_images_indices |
A list of indices for the test images. |
|
datasets |
The datasets containing training, validation, and test sets. |
|
trainset |
The training dataset. |
|
valset |
The validation dataset. |
|
testset |
The test dataset. |
Methods: execute(): Executes the logging process for train, validation, and test images. _get_log_train_images() -> callable: Returns a function that logs the training images. _get_log_val_images() -> callable: Returns a function that logs the validation images. _get_log_test_images() -> callable: Returns a function that logs the test images. _log_image(image, mask, pred_mask, dataset, idx): Logs the image, predicted mask, and mask difference to wandb. skip() -> bool: Returns False indicating that this process should not be skipped.
__init__(controller, force, selected_images)
¶
Initialize ResultProcess.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
controller
|
Any
|
Controller/manager providing access to permanences. |
required |
force
|
bool
|
Whether to force execution. |
required |
selected_images
|
dict[str, list[int]]
|
Dictionary mapping dataset types to image indices. |
required |