training_status
Status and updates generated by the training worker.
TrainUpdate dataclass #
Update from the training worker.
Source code in src/careamics_napari/signals/training_status.py
TrainUpdateType #
Bases: str, Enum
Type of training update.
Source code in src/careamics_napari/signals/training_status.py
BATCH = 'batch_idx' class-attribute instance-attribute #
Index of the current batch.
CAREAMIST = 'careamist' class-attribute instance-attribute #
CAREamist instance.
DEBUG = 'debug message' class-attribute instance-attribute #
Debug message.
EPOCH = 'epoch_idx' class-attribute instance-attribute #
Index of the current epoch.
EXCEPTION = 'exception' class-attribute instance-attribute #
Exception raised during the training process.
LOSS = 'loss' class-attribute instance-attribute #
Current loss value.
MAX_BATCH = 'max_batches' class-attribute instance-attribute #
Number of batches.
MAX_EPOCH = 'max_epochs' class-attribute instance-attribute #
Number of epochs.
STATE = 'state' class-attribute instance-attribute #
Current state of the training process.
VAL_LOSS = 'val_loss' class-attribute instance-attribute #
Current validation loss value.
TrainingState #
Bases: IntEnum
Training state.
Source code in src/careamics_napari/signals/training_status.py
CRASHED = 4 class-attribute instance-attribute #
Training crashed.
DONE = 2 class-attribute instance-attribute #
Training is done.
IDLE = 0 class-attribute instance-attribute #
Training is idle.
STOPPED = 3 class-attribute instance-attribute #
Training was stopped.
TRAINING = 1 class-attribute instance-attribute #
Training is ongoing.
TrainingStatus dataclass #
Status of the training thread.
This dataclass is used to update the training UI with the current status and progress of the training. Listeners can be registered to the events attribute to be notified of changes in the value of the attributes (see psygnal documentation for more details).
Source code in src/careamics_napari/signals/training_status.py
batch_idx = -1 class-attribute instance-attribute #
Index of the current batch.
epoch_idx = -1 class-attribute instance-attribute #
Index of the current epoch.
events instance-attribute #
Attribute allowing the registration of parameter-specific listeners.
loss = -1 class-attribute instance-attribute #
Current loss value.
max_batches = -1 class-attribute instance-attribute #
Number of batches.
max_epochs = -1 class-attribute instance-attribute #
Number of epochs.
state = TrainingState.IDLE class-attribute instance-attribute #
Current state of the training process.
val_loss = -1 class-attribute instance-attribute #
Current validation loss value.
update(new_update) #
Update the status with the new values.
Exceptions, debugging messages and CAREamist instances are ignored.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
new_update | PredictionUpdate | New update to apply. | required |
Source code in src/careamics_napari/signals/training_status.py
TrainingStatusSignalGroup #
Bases: SignalGroup
Signal group for the training status dataclass.
Source code in src/careamics_napari/signals/training_status.py
batch_idx instance-attribute #
Index of the current batch.
epoch_idx instance-attribute #
Index of the current epoch.
loss instance-attribute #
Current loss value.
max_batches instance-attribute #
Number of batches.
max_epochs instance-attribute #
Number of epochs.
state instance-attribute #
Current state of the training process.
val_loss instance-attribute #
Current validation loss value.