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.

    gcloud services enable iam.googleapis.com  compute.googleapis.com notebooks.googleapis.com storage.googleapis.com aiplatform.googleapis.com
  8. Grant roles to your user account. Run the following command once for each of the following IAM roles: roles/aiplatform.user, roles/storage.admin

    gcloud projects add-iam-policy-binding PROJECT_ID --member="user:USER_IDENTIFIER" --role=ROLE

    Replace the following:

    • PROJECT_ID: your project ID.
    • USER_IDENTIFIER: the identifier for your user account—for example, myemail@example.com.
    • ROLE: the IAM role that you grant to your user account.
  9. Vertex AI ユーザー(roles/aiplatform.user)IAM ロールにより、Vertex AI 内のすべてのリソースを使用するためのアクセス権が付与されます。ストレージ管理者roles/storage.admin)のロールを使用すると、ドキュメントのトレーニング データセットを Cloud Storage に保存できます。

次のステップ

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