You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/11/04 15:50:39 UTC

[GitHub] [beam] AnandInguva commented on a diff in pull request #23642: Add custom inference fn suport to the sklearn model handlers

AnandInguva commented on code in PR #23642:
URL: https://github.com/apache/beam/pull/23642#discussion_r1014200372


##########
sdks/python/apache_beam/ml/inference/sklearn_inference.py:
##########
@@ -156,7 +174,8 @@ class SklearnModelHandlerPandas(ModelHandler[pandas.DataFrame,
   def __init__(
       self,
       model_uri: str,
-      model_file_type: ModelFileType = ModelFileType.PICKLE):
+      model_file_type: ModelFileType = ModelFileType.PICKLE,
+      inference_fn: Optional[Callable[[BaseEstimator, Sequence[pandas.DataFrame], Optional[Dict[str, Any]]], Any]] = _default_pandas_inference_fn):

Review Comment:
   What are we doing here? if we add this later, this could be a breaking change for user who is already using it since numpy Modelhandler is backwards compatible.
   
   I am +1 to add this.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org