Hello 表形式データ: プロジェクトと環境の設定

このチュートリアルでは、 Google Cloud コンソールで表形式データモデルをトレーニングして予測を取得するために必要な手順について説明します。Vertex AI SDK for Python を使用する場合は、クライアントを初期化するサービス アカウントに Vertex AI サービス エージェントroles/aiplatform.serviceAgent)IAM ロールが割り当てられていることを確認します。

チュートリアルのこのパートでは、Vertex AI と Cloud Storage バケットを使用するように Google Cloud プロジェクトを設定します。このバケットに AutoML モデルのトレーニングで使用するドキュメントを格納します。

プロジェクトと環境を設定する

  1. In the Google Cloud console, go to the project selector page.

    Go to project selector

  2. 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 (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.
  3. Verify that billing is enabled for your Google Cloud project.

  4. Cloud Shell を開きます。Cloud Shell は Google Cloud のインタラクティブなシェル環境であり、ウェブブラウザからプロジェクトやリソースを管理できます。
  5. Cloud Shell に移動
  6. Cloud Shell で、現在のプロジェクトを Google Cloudプロジェクト ID に設定し、projectid シェル変数に格納します。
      gcloud config set project PROJECT_ID &&
      projectid=PROJECT_ID &&
      echo $projectid
    PROJECT_ID は、実際のプロジェクト ID に置き換えます。プロジェクト ID は Google Cloud コンソールで確認できます。詳細については、プロジェクト ID を確認するをご覧ください。
  7. Enable the IAM, Compute Engine, Notebooks, Cloud Storage, and Vertex AI APIs.

    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 APIs

  8. Make sure that you have the following role or roles on the project: roles/aiplatform.user, roles/storage.admin

    Check for the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.

    4. For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.

    Grant the roles

    1. In the Google Cloud console, go to the IAM page.

      [IAM] に移動

    2. プロジェクトを選択します。
    3. [ アクセスを許可] をクリックします。
    4. [新しいプリンシパル] フィールドに、ユーザー ID を入力します。 これは通常、Google アカウントのメールアドレスです。

    5. [ロールを選択] リストでロールを選択します。
    6. 追加のロールを付与するには、 [別のロールを追加] をクリックして各ロールを追加します。
    7. [保存] をクリックします。

    Vertex AI ユーザー(roles/aiplatform.user)IAM ロールにより、Vertex AI 内のすべてのリソースを使用するためのアクセス権が付与されます。ストレージ管理者roles/storage.admin)のロールを使用すると、ドキュメントのトレーニング データセットを Cloud Storage に保存できます。

    次のステップ

    このチュートリアルの次のページの手順に沿って表形式のデータセットを作成し、分類モデルをトレーニングする。