File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -2187,14 +2187,19 @@ def inplace_predict(
2187
2187
base_margin : Any = None ,
2188
2188
strict_shape : bool = False ,
2189
2189
) -> NumpyOrCupy :
2190
- """Run prediction in-place, Unlike :py:meth:`predict` method, inplace prediction
2191
- does not cache the prediction result.
2190
+ """Run prediction in-place when possible , Unlike :py:meth:`predict` method,
2191
+ inplace prediction does not cache the prediction result.
2192
2192
2193
2193
Calling only ``inplace_predict`` in multiple threads is safe and lock
2194
2194
free. But the safety does not hold when used in conjunction with other
2195
2195
methods. E.g. you can't train the booster in one thread and perform
2196
2196
prediction in the other.
2197
2197
2198
+ .. note::
2199
+
2200
+ If the device ordinal of the input data doesn't match the one configured for
2201
+ the booster, data will be copied to the booster device.
2202
+
2198
2203
.. code-block:: python
2199
2204
2200
2205
booster.set_param({"predictor": "gpu_predictor"})
You can’t perform that action at this time.
0 commit comments