Google Vertex AI
  • 18 Apr 2024
  • 3 Minutes to read
  • Dark
    Light

Google Vertex AI

  • Dark
    Light

Article summary

Overview

Module Details

Core or Github ModuleCore
Restart Required No
Steps ExposedYes
Step Location AI > Google Vertex AI
Settings Location Settings > Google Cloud Settings
Prerequisites
  • Google Cloud Project
    • GCP Region and Project ID

Google Vertex AI is a machine learning (ML) platform offered by Google Cloud. It is designed to help organizations build, deploy, and manage large-scale machine-learning models. Vertex AI provides a unified and integrated environment for ML practitioners and data scientists to streamline the development and deployment of AI solutions. 

Vertex AI offers a spectrum of options for model training and deployment:

  • AutoML: With AutoML, train models on various data types, including tabular, image, text, or video data, all without the need for coding or the intricacies of data preparation.
  • Custom Training: For those who require full control, custom training provides the flexibility to dictate every aspect of the training process. This includes utilizing the preferred ML framework, crafting training code, and tailoring hyperparameter tuning options to specific requirements.
  • Model Garden: In the Model Garden, explore, evaluate, adapt, and deploy Vertex AI and select open-source (OSS) models and assets. This repository empowers you to find the right models for the project.
  • Generative AI: Vertex AI opens the door to Google's extensive generative AI models spanning text, code, images, and speech. Fine-tune Google's LLMs to align precisely with your needs and deploy them seamlessly into AI-powered applications.

Configuration/Properties

Settings > Google Cloud Settings

Google Cloud project

JSON Credentials

To obtain a JSON file with credentials for Google Cloud Platform (GCP),  create a service account and generate a key for that service account. 

Go to the Google Cloud Console.

Select Your Project:

  • If you haven't already created a project, create one.
  • Make sure you select the project you want to create credentials for.

Create a Service Account:

  • In the left sidebar, navigate to "IAM & Admin" > "Service accounts."
  • Click the "Create Service Account" button.

Enter Service Account Details:

  • Provide a name and optional description for your service account.
  • Click "Create."

Assign Roles:

  • On the "Permissions" step, you can assign roles to your service account. Choose the appropriate roles based on the permissions your application needs. For example, you can assign the "Storage Object Admin" role if you need access to Google Cloud Storage.
  • Click "Continue."

Create a Key:

  • On the "Keys" step, you can create a key in the form of a JSON file or a P12 file. JSON is recommended for most use cases.
  • Click the "Create key."
  • This action will generate a JSON file containing the credentials for your service account.

Download the JSON Key File:

  • After you click the "Create key," a JSON file containing your service account credentials will be generated and automatically downloaded to your computer. You need to provide this JSON file to your application or service for authentication.
  • The JSON key file will look something like the following. Please replace the placeholder values with the actual credentials and tokens when using this JSON file. Keep this information secure and avoid exposing it in public repositories.

  • {
      "type": "service_account",
      "project_id": "your-project-id",
      "private_key_id": "your-private-key-id",
      "private_key": "-----BEGIN PRIVATE KEY-----\nYourPrivateKeyHere\n-----END PRIVATE KEY-----\n",
      "client_email": "your-service-account-email@your-project-id.iam.gserviceaccount.com",
      "client_id": "your-client-id",
      "auth_uri": "https://accounts.google.com/o/oauth2/auth",
      "token_uri": "https://oauth2.googleapis.com/token",
      "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
      "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/your-service-account-email%40your-project-id.iam.gserviceaccount.com",
      "scopes": ["https://www.googleapis.com/auth/cloud-translation"],
      "refresh_token": "your-refresh-token"
    }
    

Region and Project ID

In Google Cloud Platform (GCP), you can find the GCP region and project ID in the Google Cloud Console. 

GCP Region:

The Region can be found and set in the Vertex AI dashboard at the very bottom.

GCP Project ID:

  1. Google Cloud Console: Log in to your Google Cloud Console.
  2. Navigation Menu: Click on the navigation menu (the three horizontal lines in the top-left corner).
  3. IAM & Admin: Under the "IAM & Admin" section, click on "Settings."
  4. Project ID: On the "Settings" page, your GCP project ID is listed under the "Project info" section. It's displayed as "Project ID."

Exposed Steps

Step NameDescription
Get AI PredictionThe "Get AI Prediction" step is designed to provide predictions or inferences from a trained machine learning model deployed on the Google Vertex AI platform. It allows you to submit input data to the deployed model and receive predictions as output.
Get Embedding for TextThe "Get Embedding for Text" step is used to obtain numerical vector representations (embeddings) for text data. Text embeddings represent the semantic meaning of text, enabling various downstream natural language processing (NLP) tasks, such as text classification, clustering, or similarity analysis.

Was this article helpful?