From 4706c9590b4fca98de8b713dc7d402b74f4f6c16 Mon Sep 17 00:00:00 2001 From: fynnbe Date: Thu, 2 May 2024 10:22:37 +0200 Subject: [PATCH] skip simple procs if their input is not present (some inputs are optional) --- bioimageio/core/proc_ops.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bioimageio/core/proc_ops.py b/bioimageio/core/proc_ops.py index b05d7c8b..96419b3e 100644 --- a/bioimageio/core/proc_ops.py +++ b/bioimageio/core/proc_ops.py @@ -73,6 +73,9 @@ def required_measures(self) -> Collection[Measure]: def get_output_shape(self, input_shape: PerAxis[int]) -> PerAxis[int]: ... def __call__(self, sample: Union[Sample, SampleBlock]) -> None: + if self.input not in sample.members: + return + input_tensor = sample.members[self.input] output_tensor = self._apply(input_tensor, sample.stat)