rszper commented on code in PR #29509: URL: https://github.com/apache/beam/pull/29509#discussion_r1401286612
########## website/www/site/content/en/documentation/ml/about-ml.md: ########## @@ -38,38 +40,48 @@ limitations under the License. You can use Apache Beam to: * Process large volumes of data, both for preprocessing and for inference. -* Experiment with your data during the exploration phase of your project and provides a seamless transition when - upscaling your data pipelines as part of your MLOps ecosystem in a production environment. +* Experiment with your data during the exploration phase of your project. +* Upscale your data pipelines as part of your ML ops ecosystem in a production environment. * Run your model in production on a varying data load, both in batch and streaming. ## AI/ML workloads -You can use Apache Beam for data validation, data preprocessing, model validation, and model deployment/inference. +You can use Apache Beam for data validation, data preprocessing, model validation, and model deployment and inference.  -1. Data ingestion: Incoming new data is stored in your file system or database, or it's published to a messaging queue. -2. **Data validation**: After you receieve your data, check the quality of your data. For example, you might want to detect outliers and calculate standard deviations and class distributions. -3. **Data preprocessing**: After you validate your data, transform the data so that it is ready to use to train your model. -4. Model training: When your data is ready, you can start training your AI/ML model. This step is typically repeated multiple times, depending on the quality of your trained model. -5. Model validation: Before you deploy your new model, validate its performance and accuracy. +1. Data ingestion: Incoming new data is either stored in your file system or database, or published to a messaging queue. +2. **Data validation**: After you receieve your data, check the quality of the data. For example, you might want to detect outliers and calculate standard deviations and class distributions. +3. **Data preprocessing**: After you validate your data, transform the data so that it's ready to use to train your model. +4. Model training: When your data is ready, train your AI/ML model. This step is typically repeated multiple times, depending on the quality of your trained model. +5. Model validation: Before you deploy your model, validate its performance and accuracy. 6. **Model deployment**: Deploy your model, using it to run inference on new or existing data. -To keep your model up to date and performing well as your data grows and evolves, run these steps multiple times. In addition, you can apply MLOps to your project to automate the AI/ML workflows throughout the model and data lifecycle. Use orchestrators to automate this flow and to handle the transition between the different building blocks in your project. +To keep your model up to date and performing well as your data grows and evolves, run these steps multiple times. In addition, you can apply ML ops to your project to automate the AI/ML workflows throughout the model and data lifecycle. Use orchestrators to automate this flow and to handle the transition between the different building blocks in your project. ## Use RunInference -The recommended way to implement inference in Apache Beam is by using the [RunInference API](/documentation/sdks/python-machine-learning/). RunInference takes advantage of existing Apache Beam concepts, such as the `BatchElements` transform and the `Shared` class, to enable you to use models in your pipelines to create transforms optimized for machine learning inferences. The ability to create arbitrarily complex workflow graphs also allows you to build multi-model pipelines. +The [RunInference API](/documentation/sdks/python-machine-learning/) is a `PTransform` optimized for machine learning inferences that lets you efficiently use ML models in your pipelines. The API includes the following features: -You can integrate your model in your pipeline by using the corresponding model handlers. A `ModelHandler` is an object that wraps the underlying model and allows you to configure its parameters. Model handlers are available for PyTorch, scikit-learn, and TensorFlow. Examples of how to use RunInference for PyTorch, scikit-learn, and TensorFlow are shown in this [notebook](https://github.com/apache/beam/blob/master/examples/notebooks/beam-ml/run_inference_pytorch_tensorflow_sklearn.ipynb). +- To efficiently feed your model, dynamically batches inputs based on pipeline throughput. +- To optimize your pipeline for ML inference, takes advantage of existing Apache Beam concepts, such as the `BatchElements` transform and the `Shared` class. Review Comment: I agree. Updated. -- 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]
