Skip to content

Commit

Permalink
Merge pull request #387 from bioimage-io/optional_procs
Browse files Browse the repository at this point in the history
skip simple procs if their input is not present
  • Loading branch information
FynnBe authored May 2, 2024
2 parents 92e8f43 + 4706c95 commit 5449618
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bioimageio/core/proc_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 5449618

Please sign in to comment.