You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by bh...@apache.org on 2022/05/27 17:43:59 UTC

[beam] branch master updated: [BEAM-13972] Update documentation for run inference (#17508)

This is an automated email from the ASF dual-hosted git repository.

bhulette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 76356acd85d [BEAM-13972] Update documentation for run inference (#17508)
76356acd85d is described below

commit 76356acd85db88c5f27fda478c8f6445d7b41a35
Author: Ryan Thompson <ry...@gmail.com>
AuthorDate: Fri May 27 13:43:53 2022 -0400

    [BEAM-13972] Update documentation for run inference (#17508)
    
    * added comment about runiference being under development
    
    * removed date
---
 sdks/python/apache_beam/ml/inference/api.py               | 3 +++
 sdks/python/apache_beam/ml/inference/pytorch.py           | 6 +++++-
 sdks/python/apache_beam/ml/inference/sklearn_inference.py | 5 +++++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/sdks/python/apache_beam/ml/inference/api.py b/sdks/python/apache_beam/ml/inference/api.py
index 10a5a306704..68bd20fbb2d 100644
--- a/sdks/python/apache_beam/ml/inference/api.py
+++ b/sdks/python/apache_beam/ml/inference/api.py
@@ -39,6 +39,9 @@ class PredictionResult:
 @beam.typehints.with_output_types(Union[PredictionResult, Tuple[_K, PredictionResult]])  # pylint: disable=line-too-long
 class RunInference(beam.PTransform):
   """
+  NOTE: This API and its implementation are under development and
+  do not provide backward compatibility guarantees.
+
   A transform that takes a PCollection of examples (or features) to be used on
   an ML model. It will then output inferences (or predictions) for those
   examples in a PCollection of PredictionResults, containing the input examples
diff --git a/sdks/python/apache_beam/ml/inference/pytorch.py b/sdks/python/apache_beam/ml/inference/pytorch.py
index 1eac09af3a7..d7e24d61823 100644
--- a/sdks/python/apache_beam/ml/inference/pytorch.py
+++ b/sdks/python/apache_beam/ml/inference/pytorch.py
@@ -67,7 +67,11 @@ class PytorchInferenceRunner(InferenceRunner):
 
 
 class PytorchModelLoader(ModelLoader):
-  """Loads a Pytorch Model."""
+  """ Implementation of the ModelLoader interface for PyTorch.
+
+      NOTE: This API and its implementation are under development and
+      do not provide backward compatibility guarantees.
+  """
   def __init__(
       self,
       state_dict_path: str,
diff --git a/sdks/python/apache_beam/ml/inference/sklearn_inference.py b/sdks/python/apache_beam/ml/inference/sklearn_inference.py
index 3b56eada881..80530146c2c 100644
--- a/sdks/python/apache_beam/ml/inference/sklearn_inference.py
+++ b/sdks/python/apache_beam/ml/inference/sklearn_inference.py
@@ -55,6 +55,11 @@ class SklearnInferenceRunner(InferenceRunner):
 
 
 class SklearnModelLoader(ModelLoader):
+  """ Implementation of the ModelLoader interface for scikit learn.
+
+      NOTE: This API and its implementation are under development and
+      do not provide backward compatibility guarantees.
+  """
   def __init__(
       self,
       model_file_type: ModelFileType = ModelFileType.PICKLE,