为 Vertex AI Experiments 设置

您可以通过 Agent Platform SDK for Python 和 Google Cloud 控制台使用 Vertex AI Experiments。Vertex AI Experiments 需要并依赖于 Vertex ML Metadata

设置

  1. 登录您的 Google Cloud 账号。如果您是 Google Cloud的新用户, 请创建一个账号,以评估我们的产品在 真实场景中的表现。新客户还可以获得 300 美元的免费抵用金,用于 运行、测试和部署工作负载。
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the required API.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the API

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  6. Verify that billing is enabled for your Google Cloud project.

  7. Enable the required API.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the API

  8. 创建服务账号。请参阅创建具有所需权限的服务帐号
  9. 安装 Agent Platform SDK for Python。
  10. 检查您的项目中是否存在 default 元数据存储区 。(必需)
    • 如需查看您的项目是否具有 default 元数据存储区,请前往 Google Cloud 控制台中的 Metadata 页面。
    • 如果 default 元数据存储区不存在,则系统会在以下情况下创建它
      • 您运行第一个 PipelineJob 时创建它、
      • 或者,在 Agent Platform SDK for Python 中创建您的第一个实验。
        可选:如需使用 CMEK 进行配置,请参阅配置项目的元数据存储区。

支持的位置

功能可用性表列出了 Vertex AI Experiments 的可用位置。使用 Vertex AI Pipelines 或 Vertex AI TensorBoard 时,它们必须与 Agent Platform 实验位于同一位置。

后续步骤

相关笔记本教程

  1. 比较经过训练和评估的模型
  2. 使用预构建的数据预处理代码进行模型训练
  3. 比较流水线运行
  4. 自动日志记录