ryanthompson591 commented on code in PR #17800:
URL: https://github.com/apache/beam/pull/17800#discussion_r892469936
##########
sdks/python/apache_beam/ml/inference/sklearn_inference.py:
##########
@@ -71,7 +72,7 @@ def _predict_pandas_dataframe(batch: List[pandas.DataFrame],
# vectorize data for better performance
vectorized_batch = pandas.concat(batch, axis=0)
predictions = model.predict(vectorized_batch)
- splits = [vectorized_batch.loc[[i]] for i in vectorized_batch.index]
+ splits = [vectorized_batch.iloc[[i]] for i in range(len(batch))]
Review Comment:
I think for now it is ok to raise an exception.
In the future we should support multiple rows.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]