prediction_status
Status and updates generated by the prediction worker.
PredictionState #
Bases: IntEnum
Prediction state.
Source code in src/careamics_napari/signals/prediction_status.py
CRASHED = 4 class-attribute instance-attribute #
Prediction crashed.
DONE = 2 class-attribute instance-attribute #
Prediction is done.
IDLE = 0 class-attribute instance-attribute #
Prediction is idle.
PREDICTING = 1 class-attribute instance-attribute #
Prediction is ongoing.
STOPPED = 3 class-attribute instance-attribute #
Prediction was stopped.
PredictionStatus dataclass #
Status of the prediction thread.
This dataclass is used to update the prediction UI with the current status and progress of the prediction. 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/prediction_status.py
events instance-attribute #
Attribute allowing the registration of parameter-specific listeners.
max_samples = -1 class-attribute instance-attribute #
Number of samples.
sample_idx = -1 class-attribute instance-attribute #
Index of the current sample being predicted.
state = PredictionState.IDLE class-attribute instance-attribute #
Current state of the prediction process.
update(new_update) #
Update the status with the new values.
Exceptions, debugging messages and samples are ignored.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
new_update | PredictionUpdate | New update to apply. | required |
Source code in src/careamics_napari/signals/prediction_status.py
PredictionStatusSignalGroup #
Bases: SignalGroup
Signal group for the prediction status dataclass.
Source code in src/careamics_napari/signals/prediction_status.py
PredictionUpdate dataclass #
Update from the prediction worker.
Source code in src/careamics_napari/signals/prediction_status.py
PredictionUpdateType #
Bases: str, Enum
Type of prediction update.
Source code in src/careamics_napari/signals/prediction_status.py
DEBUG = 'debug message' class-attribute instance-attribute #
Debug message.
EXCEPTION = 'exception' class-attribute instance-attribute #
Exception raised during the prediction process.
MAX_SAMPLES = 'max_samples' class-attribute instance-attribute #
Number of samples.
SAMPLE = 'sample' class-attribute instance-attribute #
Prediction result.
SAMPLE_IDX = 'sample_idx' class-attribute instance-attribute #
Index of the current sample being predicted.
STATE = 'state' class-attribute instance-attribute #
Current state of the prediction process.