Skip to content

Commit 325de6d

Browse files
committed
update docstring for predict_patchwise
1 parent 88ae024 commit 325de6d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

deepsensor/model/model.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,11 +680,14 @@ def predict_patchwise(
680680
progress_bar: int = 0,
681681
verbose: bool = False,
682682
) -> Prediction:
683-
"""Predict on a regular grid or at off-grid locations.
683+
"""Predict using a tasks loaded using a sliding window patching strategy. Uses the `predict` method.
684+
685+
.. versionadded:: 0.4.3
686+
:py:func:`predict_patchwise()` method.
684687
685688
Args:
686689
tasks (List[Task] | Task):
687-
List of tasks containing context data.
690+
List of tasks containing context data. Tasks for patchwise prediction must be generated by a task loader using the "sliding" patching strategy.
688691
data_processor (:class:`~.data.processor.DataProcessor`):
689692
Used for unnormalising the coordinates of the bounding boxes of patches.
690693
X_t (:class:`xarray.Dataset` | :class:`xarray.DataArray` | :class:`pandas.DataFrame` | :class:`pandas.Series` | :class:`pandas.Index` | :class:`numpy:numpy.ndarray`):
@@ -742,6 +745,9 @@ def predict_patchwise(
742745
predictions.
743746
744747
Raises:
748+
AttributeError
749+
If ``tasks`` are not generated using the "sliding" patching strategy of TaskLoader,
750+
i.e. if they do not have a ``bbox`` attribute.
745751
ValueError
746752
If ``X_t`` is not an xarray object and
747753
``resolution_factor`` is not 1 or ``ar_subsample_factor`` is

0 commit comments

Comments
 (0)