kamilwu commented on a change in pull request #11075: [BEAM-9421] Website 
section that describes getting predictions using AI Platform Prediciton
URL: https://github.com/apache/beam/pull/11075#discussion_r395113820
 
 

 ##########
 File path: website/src/documentation/patterns/ai-platform.md
 ##########
 @@ -0,0 +1,87 @@
+---
+layout: section
+title: "AI Platform integration patterns"
+section_menu: section-menu/documentation.html
+permalink: /documentation/patterns/ai-platform/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# AI Platform integration patterns
+
+This page describes common patterns in pipelines with Google Cloud AI Platform 
transforms.
+
+<nav class="language-switcher">
+  <strong>Adapt for:</strong>
+  <ul>
+    <li data-type="language-java">Java SDK</li>
+    <li data-type="language-py" class="active">Python SDK</li>
+  </ul>
+</nav>
+
+## Getting predictions
+
+This section shows how to use [Google Cloud AI Platform 
Prediction](https://cloud.google.com/ai-platform/prediction/docs/overview) to 
make predictions about new data from a cloud-hosted machine learning model.
+ 
+[tfx_bsl](https://github.com/tensorflow/tfx-bsl) is a library with a Beam 
PTransform called `RunInference`. `RunInference` is able to perform an 
inference that can use a service endpoint. When using a service endpoint, the 
transform takes a PCollection of type `tf.train.Example` and, for every bunch 
of elements, sends a request to AI Platform Prediction. The transform produces 
a PCollection of type `PredictLog`, which contains predictions.
 
 Review comment:
   >  Is there away to configure how many elements are in the batch?
   
   No, in this case Beam handles the size of a batch on its own.
   
   > I think the previous version of this paragraph stated that one request is 
sent per element.
   
   That's right. After a discussion on batching it comes to my mind this is not 
truly correct.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to