Skip to content

Commit bf21226

Browse files
committed
add to doc strings
1 parent 024608a commit bf21226

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

bioimageio/core/prediction_pipeline/_prediction_pipeline.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def predict(self, *input_tensors: xr.DataArray) -> List[xr.DataArray]:
135135
return self._model.forward(*input_tensors)
136136

137137
def apply_preprocessing(self, sample: Sample, computed_measures: ComputedMeasures) -> None:
138-
"""apply preprocessing in-place"""
138+
"""apply preprocessing in-place, also updates given computed_measures"""
139139
self._ipt_stats.update_with_sample(sample)
140140
for mode, stats in self._ipt_stats.compute_measures().items():
141141
if mode not in computed_measures:
@@ -145,7 +145,7 @@ def apply_preprocessing(self, sample: Sample, computed_measures: ComputedMeasure
145145
self._preprocessing.apply(sample, computed_measures)
146146

147147
def apply_postprocessing(self, sample: Sample, computed_measures: ComputedMeasures) -> None:
148-
"""apply postprocessing in-place"""
148+
"""apply postprocessing in-place, also updates given computed_measures"""
149149
self._out_stats.update_with_sample(sample)
150150
for mode, stats in self._out_stats.compute_measures().items():
151151
if mode not in computed_measures:
@@ -155,7 +155,9 @@ def apply_postprocessing(self, sample: Sample, computed_measures: ComputedMeasur
155155
self._postprocessing.apply(sample, computed_measures)
156156

157157
def forward(self, *input_tensors: xr.DataArray) -> List[xr.DataArray]:
158-
"""Apply preprocessing, run prediction and apply postprocessing."""
158+
"""Apply preprocessing, run prediction and apply postprocessing.
159+
Note: The preprocessing might change input_tensors in-pace.
160+
"""
159161
input_sample = dict(zip([ipt.name for ipt in self.input_specs], input_tensors))
160162
computed_measures = {}
161163
self.apply_preprocessing(input_sample, computed_measures)

0 commit comments

Comments
 (0)