<@U024DTV3HUH> Updating your PR that removes ext.w...
# mcmicro
j
@Adam Taylor Updating your PR that removes ext.when for the segmenters so it's mergeable. Linting uncovered that you edited the local copy of the cellpose and mesmer modules without creating a
.diff
. I'm looking at the most recent upstream versions of those modules and it looks like cellpose added
process_gpu
so maybe we should just update for that. Can you explain what was fixed by adding the
stageAs
arg to
path(model, stageAs: '?/*')
?
a
@Jeremy Muhlich can you point me towards the PR... will review as to exactly what past me had run into... it will have been a Seqera Platform issue
Ah apologies for past-me
j
merged now
but I did delete those few changes in the cellpose and mesmer main.nf files
a
stageAs addressed a consequence of the fact that the workflow invokes all three segmenters unconditionally. Which one actually runs is only decided by
ext.when
in
conf/modules.config
. eg
Copy code
withName: "CELLPOSE" { ext.when = {params.segmentation…contains('cellpose')} }
Here CELLPOSE always feeds a default
params.cellpose_model
of
[]
, so if only MESMER is specified, the CELLPOSE process still gets an empty model input, which failed on
path(model)
when model was empty — on Batch this validation occurs before the process even kicks off, so it kills the workflow. Using
path(model, stageAs: '?/*')
as a way to stage optional paths allows us to bypass this step and enable the workflow to continue as expected.
j
Does the new
if (params.segmentation?.split(',')?.contains('cellpose'))
fix that without messing with
stageAs
?
I need to set up an AWS test environment for myself 😅
a
I don't think so, because the workflow still gets invoked.
I think a similar fix is needed in mesmer's empty
membrane_img
default