ExecutionTemplate

筆記本執行工作負載的說明。

JSON 表示法
{
  "scaleTier": enum (ScaleTier),
  "masterType": string,
  "acceleratorConfig": {
    object (SchedulerAcceleratorConfig)
  },
  "labels": {
    string: string,
    ...
  },
  "inputNotebookFile": string,
  "containerImageUri": string,
  "outputNotebookFolder": string,
  "paramsYamlFile": string,
  "parameters": string,
  "serviceAccount": string,
  "jobType": enum (JobType),
  "kernelSpec": string,
  "tensorboard": string,

  // Union field job_parameters can be only one of the following:
  "dataprocParameters": {
    object (DataprocParameters)
  },
  "vertexAiParameters": {
    object (VertexAIParameters)
  }
  // End of list of possible types for union field job_parameters.
}
欄位
scaleTier
(deprecated)

enum (ScaleTier)

這是必要旗標,用於執行筆記本的硬體規模層級。[已淘汰] 即將停用。因為目前僅支援 CUSTOM。

masterType

string

指定訓練工作主要工作站所用的虛擬機器類型。如果 scaleTier 設為 CUSTOM,您就必須指定這個欄位。

您可以在這個欄位中直接使用特定 Compute Engine 機器類型。mapTypeId 支援的類型如下:

  • n1-standard-4
  • n1-standard-8
  • n1-standard-16
  • n1-standard-32
  • n1-standard-64
  • n1-standard-96
  • n1-highmem-2
  • n1-highmem-4
  • n1-highmem-8
  • n1-highmem-16
  • n1-highmem-32
  • n1-highmem-64
  • n1-highmem-96
  • n1-highcpu-16
  • n1-highcpu-32
  • n1-highcpu-64
  • n1-highcpu-96

或者,您也可以使用下列舊版機器類型:

  • standard
  • large_model
  • complex_model_s
  • complex_model_m
  • complex_model_l
  • standard_gpu
  • complex_model_m_gpu
  • complex_model_l_gpu
  • standard_p100
  • complex_model_m_p100
  • standard_v100
  • large_model_v100
  • complex_model_m_v100
  • complex_model_l_v100

最後,如要使用 TPU 進行訓練,請在這個欄位中指定 cloud_tpu。進一步瞭解使用 TPU 訓練的特殊設定選項

acceleratorConfig

object (SchedulerAcceleratorConfig)

執行筆記本時使用的硬體設定 (數量和加速器類型)。

labels

map (key: string, value: string)

執行作業的標籤。如果執行作業已排定時間,則會納入「nbs-scheduled」欄位。否則為立即執行,且包含的欄位為「nbs-immediate」。使用欄位可有效率地為各種執行類型建立索引。

包含 "key": value 組合清單的物件,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

inputNotebookFile

string

要執行的筆記本檔案路徑。必須位於 Google Cloud Storage bucket 中。格式:gs://{bucket_name}/{folder}/{notebook_file_name} 示例:gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb

containerImageUri

string

DLVM 的容器映像檔 URI。範例:'gcr.io/deeplearning-platform-release/base-cu100'。如需更多範例,請參閱:https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container

outputNotebookFolder

string

要寫入的筆記本資料夾路徑。必須是 Google Cloud Storage 值區路徑。格式:gs://{bucket_name}/{folder} 例如:gs://notebook_user/scheduled_notebooks

paramsYamlFile

string

在執行期間要覆寫筆記本中的參數。請參閱 https://papermill.readthedocs.io/en/latest/usage-parameterize.html,瞭解如何在輸入筆記本中指定參數,並在 YAML 檔案中傳遞這些參數。例如:gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml

parameters

string

在「inputNotebookFile」筆記本中使用的參數。

serviceAccount

string

執行作業時要使用的服務帳戶電子郵件地址。您必須擁有指定服務帳戶的 iam.serviceAccounts.actAs 權限。

jobType

enum (JobType)

這項執行作業要使用的 Job 類型。

kernelSpec

string

要使用的核心規格名稱。如果執行目標上的核心規格名稱與輸入筆記本檔案中的名稱不符,就必須指定這個名稱。

tensorboard

string

Agent Platform [TensorBoard] 資源的名稱,執行作業會將 TensorBoard 記錄上傳至該資源。格式:projects/{project}/locations/{location}/tensorboards/{tensorboard}

聯集欄位 job_parameters。執行類型的參數。注意:目前 Vertex AI 工作沒有額外參數。job_parameters 只能是下列其中一個設定:
dataprocParameters

object (DataprocParameters)

Dataproc JobType 執行作業中使用的參數。

vertexAiParameters

object (VertexAIParameters)

在 Agent Platform JobType 執行作業中使用的參數。

ScaleTier

這是必要旗標,指定機器類型、工作站和參數伺服器的備用資源數量。

列舉
SCALE_TIER_UNSPECIFIED 未指定規模層級。
BASIC 單一工作站執行個體。這個層級適合學習如何使用 Cloud ML,也適合使用小型資料集對新的模型進行實驗。
STANDARD_1 許多工作站和少數參數伺服器。
PREMIUM_1 大量工作站和許多參數伺服器。
BASIC_GPU 使用 K80 GPU 的單一 worker 執行個體。
BASIC_TPU 具有 Cloud TPU 的單一 worker 執行個體。
CUSTOM

CUSTOM 層級不是固定層級,而是能讓您使用自己的叢集規格。使用此層級時,請依據下列規定來設定值,以設定您的處理叢集:

  • 必須設定 ExecutionTemplate.masterType,指定要用於主要節點的機器類型。這是唯一必要的設定。

SchedulerAcceleratorConfig

硬體加速器的定義。請注意,並非所有 typecoreCount 的組合都有效。如要瞭解有效組合,請參閱「Compute Engine 上的 GPU」。不支援 TPU。

JSON 表示法
{
  "type": enum (SchedulerAcceleratorType),
  "coreCount": string
}
欄位
type

enum (SchedulerAcceleratorType)

這個加速器的類型。

coreCount

string (int64 format)

這個加速器的核心數。

SchedulerAcceleratorType

AI Platform Training 工作適用的硬體加速器類型。

列舉
SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED 未指定加速器類型。預設為無 GPU。
NVIDIA_TESLA_K80 Nvidia Tesla K80 GPU。
NVIDIA_TESLA_P100 Nvidia Tesla P100 GPU。
NVIDIA_TESLA_V100 Nvidia Tesla V100 GPU。
NVIDIA_TESLA_P4 Nvidia Tesla P4 GPU。
NVIDIA_TESLA_T4 Nvidia Tesla T4 GPU。
NVIDIA_TESLA_A100 Nvidia Tesla A100 GPU。
TPU_V2 TPU v2。
TPU_V3 TPU v3。

JobType

這項執行作業使用的後端。

列舉
JOB_TYPE_UNSPECIFIED 未指定類型。
VERTEX_AI aiplatform.googleapis.com 中的自訂工作。執行的預設值。
DATAPROC 以 Dataproc 做為工作,在叢集上執行作業。https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs

DataprocParameters

Dataproc JobType 執行作業中使用的參數。

JSON 表示法
{
  "cluster": string
}
欄位
cluster

string

用於執行 Dataproc 的叢集 URI。格式:projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}

VertexAIParameters

在 Agent Platform JobType 執行作業中使用的參數。

JSON 表示法
{
  "network": string,
  "env": {
    string: string,
    ...
  }
}
欄位
network

string

應與工作對等互連的 Compute Engine 網路全名。例如,projects/12345/global/networks/myVPC格式projects/{project}/global/networks/{network}。其中 {project} 是專案編號,如 12345 所示,{network} 則是網路名稱。

必須已針對網路設定私人服務連線。如果未指定,工作就不會與任何網路對等互連。

env

map (key: string, value: string)

環境變數。最多可指定 100 個環境變數,且不得重複。範例:GCP_BUCKET=gs://my-bucket/samples/

包含 "key": value 組合清單的物件,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }