phenotypic.abc_.OperationRequirements#

class phenotypic.abc_.OperationRequirements(grid_image: bool = False, rgb_input: bool = False, modules: tuple[str, ...] = (), extra: str | None = None, weights: tuple[WeightRequirement, ...] = ())[source]#

Bases: object

Everything an operation needs from the run that executes it.

Parameters:
grid_image#

The operation raises GridImageInputError on a plain Image.

Type:

bool

rgb_input#

The operation reads RGB pixels and fails on a grayscale image.

Type:

bool

modules#

Importable module names the operation imports lazily; checked with importlib.util.find_spec, never imported.

Type:

tuple[str, …]

extra#

The pyproject extra that provides modules, named in the remedy; None when no extra does (e.g. a conda-only package).

Type:

str | None

weights#

Model weights the operation loads.

Type:

tuple[phenotypic.abc_._requirements.WeightRequirement, …]

Methods

__init__

Attributes

grid_image: bool = False#
rgb_input: bool = False#
modules: tuple[str, ...] = ()#
extra: str | None = None#
weights: tuple[WeightRequirement, ...] = ()#