Use Cloud ML Engine to train your machine learning models at scale, to host your trained model in the cloud, and to use your model to make predictions about new data.
A brief description of machine learning
Machine learning (ML) is a subfield of artificial intelligence (AI). The goal of ML is to make computers learn from the data that you give them. Instead of writing code that describes the action the computer should take, your code provides an algorithm that adapts based on examples of intended behavior. The resulting program, consisting of the algorithm and associated learned parameters, is called a trained model.
Where Cloud ML Engine fits in the ML workflow
The diagram below gives a high-level overview of the stages in an ML workflow. The blue-filled boxes indicate where Cloud ML Engine provides managed services and APIs:
As the diagram indicates, you can use Cloud ML Engine to manage the following stages in the ML workflow:
Train an ML model on your data:
- Train model
- Evaluate model accuracy
- Tune hyperparameters
Deploy your trained model.
Send prediction requests to your model:
- Online prediction
- Batch prediction
Monitor the predictions on an ongoing basis.
Manage your models and model versions.
Components of Cloud ML Engine
This section describes the pieces that make up Cloud ML Engine and the primary purpose of each piece.
Google Cloud Platform Console
You can deploy models to the cloud and manage your models, versions, and jobs on the GCP Console. This option gives you a user interface for working with your machine learning resources. As part of GCP, your Cloud ML Engine resources are connected to useful tools like Stackdriver Logging and Stackdriver Monitoring.
gcloud command-line tool
You can manage your models and versions, submit jobs, and accomplish other
Cloud ML Engine tasks at the command line with the
gcloud ml-engine command-line tool.
gcloud commands for most Cloud ML Engine tasks, and the
REST API (see below) for online predictions.
The Cloud ML Engine REST API provides RESTful services for managing jobs, models, and versions, and for making predictions with hosted models on GCP.
You can use the Google Cloud Client Library for Python to access the APIs. When using the client library, you use Python representations of the resources and objects used by the API. This is easier and requires less code than working directly with HTTP requests.
We recommend the REST API for serving online predictions in particular.