Skip to content

saving_signal

Saving parameters set by the user.

ExportType #

Bases: Enum

Type of model export.

Source code in src/careamics_napari/signals/saving_signal.py
class ExportType(Enum):
    """Type of model export."""

    BMZ = "Bioimage.io"
    """Bioimage.io model format."""

    CKPT = "Checkpoint"
    """PyTorch Lightning checkpoint."""

    @classmethod
    def list(cls) -> list[str]:
        """List of all available export types.

        Returns
        -------
        list of str
            List of all available export types.
        """
        return [c.value for c in cls]

BMZ = 'Bioimage.io' class-attribute instance-attribute #

Bioimage.io model format.

CKPT = 'Checkpoint' class-attribute instance-attribute #

PyTorch Lightning checkpoint.

list() classmethod #

List of all available export types.

Returns:

Type Description
list of str

List of all available export types.

Source code in src/careamics_napari/signals/saving_signal.py
@classmethod
def list(cls) -> list[str]:
    """List of all available export types.

    Returns
    -------
    list of str
        List of all available export types.
    """
    return [c.value for c in cls]

SavingSignal dataclass #

Saving signal class.

This class holds the parameters required to run the prediction thread. These parameters should be set whenever the user interact with the corresponding UI elements.

Source code in src/careamics_napari/signals/saving_signal.py
@dataclass
class SavingSignal:
    """Saving signal class.

    This class holds the parameters required to run the prediction thread. These
    parameters should be set whenever the user interact with the corresponding UI
    elements.
    """

    path_model: Path = Path(".")
    """Path in which to save the model."""

    export_type: ExportType = ExportType.BMZ
    """Format of model export."""

export_type = ExportType.BMZ class-attribute instance-attribute #

Format of model export.

path_model = Path('.') class-attribute instance-attribute #

Path in which to save the model.