Skip to content

Commit 5449618

Browse files
authored
Merge pull request #387 from bioimage-io/optional_procs
skip simple procs if their input is not present
2 parents 92e8f43 + 4706c95 commit 5449618

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bioimageio/core/proc_ops.py

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ def required_measures(self) -> Collection[Measure]:
7373
def get_output_shape(self, input_shape: PerAxis[int]) -> PerAxis[int]: ...
7474

7575
def __call__(self, sample: Union[Sample, SampleBlock]) -> None:
76+
if self.input not in sample.members:
77+
return
78+
7679
input_tensor = sample.members[self.input]
7780
output_tensor = self._apply(input_tensor, sample.stat)
7881

0 commit comments

Comments
 (0)