fractal-analytics-platform / fractal-tasks-core

Main tasks for the Fractal analytics platform
https://fractal-analytics-platform.github.io/fractal-tasks-core/
BSD 3-Clause "New" or "Revised" License
14 stars 6 forks source link

Add Pydantic model for cellpose channel input? #412

Closed jluethi closed 1 year ago

jluethi commented 1 year ago

The review of input arguments & the discussions on pydantic models for napari workflows (e.g. https://github.com/fractal-analytics-platform/fractal-tasks-core/issues/404) and channel (https://github.com/fractal-analytics-platform/fractal-tasks-core/issues/386#issuecomment-1582511309) made me think:

We should also refactor the way we handle the channel inputs in Cellpose.

Currently, we do:

wavelength_id: Optional[str] = None,
channel_label: Optional[str] = None,
wavelength_id_c2: Optional[str] = None,
channel_label_c2: Optional[str] = None,

But actually, this is very similar to the input specs of napari workflows, just with slightly different limits: we can only use "image" as type and only have up to 2 images, where order matters

=> let's see whether we can use a variant of what we build for napari workflows input & output arguments here as well!

tcompa commented 1 year ago

Ref https://github.com/fractal-analytics-platform/fractal-tasks-core/issues/404#issuecomment-1592670850