# Google Cloud Notebooks V1 Client - Class ExecutionTemplate (1.1.3)

1.1.3 (latest) 1.1.2 1.0.5 0.7.5 0.6.2 0.5.0 0.4.1 0.3.6 Reference documentation and code samples for the Google Cloud Notebooks V1 Client class ExecutionTemplate.

The description a notebook execution workload.

Generated from protobuf message `google.cloud.notebooks.v1.ExecutionTemplate`

## Namespace

Google \\ Cloud \\ Notebooks \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ scale_tier` | `int` Required. Scale tier of the hardware used for notebook execution. DEPRECATED Will be discontinued. As right now only CUSTOM is supported. |
| `↳ master_type` | `string` Specifies the type of virtual machine to use for your training job's master worker. You must specify this field when `scaleTier` is set to `CUSTOM`. You can use certain Compute Engine machine types directly in this field. The following types are supported: - `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` Alternatively, you can use the following legacy machine types: - `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` Finally, if you want to use a TPU for training, specify `cloud_tpu` in this field. Learn more about the [special configuration options for training with TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine). |
| `↳ accelerator_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V1.ExecutionTemplate.SchedulerAcceleratorConfig` Configuration (count and accelerator type) for hardware running notebook execution. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Labels for execution. If execution is scheduled, a field included will be 'nbs-scheduled'. Otherwise, it is an immediate execution, and an included field will be 'nbs-immediate'. Use fields to efficiently index between various types of executions. |
| `↳ input_notebook_file` | `string` Path to the notebook file to execute. Must be in a Google Cloud Storage bucket. Format: `gs://{bucket_name}/{folder}/{notebook_file_name}` Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb` |
| `↳ container_image_uri` | `string` Container Image URI to a DLVM Example: 'gcr.io/deeplearning-platform-release/base-cu100' More examples can be found at: <https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container> |
| `↳ output_notebook_folder` | `string` Path to the notebook folder to write to. Must be in a Google Cloud Storage bucket path. Format: `gs://{bucket_name}/{folder}` Ex: `gs://notebook_user/scheduled_notebooks` |
| `↳ params_yaml_file` | `string` Parameters to be overridden in the notebook during execution. Ref <https://papermill.readthedocs.io/en/latest/usage-parameterize.html> on how to specifying parameters in the input notebook and pass them here in an YAML file. Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml` |
| `↳ parameters` | `string` Parameters used within the 'input_notebook_file' notebook. |
| `↳ service_account` | `string` The email address of a service account to use when running the execution. You must have the `iam.serviceAccounts.actAs` permission for the specified service account. |
| `↳ job_type` | `int` The type of Job to be used on this execution. |
| `↳ dataproc_parameters` | `https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V1.ExecutionTemplate.DataprocParameters` Parameters used in Dataproc JobType executions. |
| `↳ vertex_ai_parameters` | `https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V1.ExecutionTemplate.VertexAIParameters` Parameters used in Vertex AI JobType executions. |
| `↳ kernel_spec` | `string` Name of the kernel spec to use. This must be specified if the kernel spec name on the execution target does not match the name in the input notebook file. |
| `↳ tensorboard` | `string` The name of a Vertex AI \[Tensorboard\] resource to which this execution will upload Tensorboard logs. Format: `projects/{project}/locations/{location}/tensorboards/{tensorboard}` |

### getScaleTier

Required. Scale tier of the hardware used for notebook execution.

DEPRECATED Will be discontinued. As right now only CUSTOM is supported.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ScaleTier](https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V1.ExecutionTemplate.ScaleTier). |

### setScaleTier

Required. Scale tier of the hardware used for notebook execution.

DEPRECATED Will be discontinued. As right now only CUSTOM is supported.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ScaleTier](https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V1.ExecutionTemplate.ScaleTier). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMasterType

Specifies the type of virtual machine to use for your training
job's master worker. You must specify this field when `scaleTier` is set to
`CUSTOM`.

You can use certain Compute Engine machine types directly in this field.
The following types are supported:

- `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` Alternatively, you can use the following legacy machine types:
- `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` Finally, if you want to use a TPU for training, specify `cloud_tpu` in this field. Learn more about the [special configuration options for training
  with
  TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setMasterType

Specifies the type of virtual machine to use for your training
job's master worker. You must specify this field when `scaleTier` is set to
`CUSTOM`.

You can use certain Compute Engine machine types directly in this field.
The following types are supported:

- `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` Alternatively, you can use the following legacy machine types:
- `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` Finally, if you want to use a TPU for training, specify `cloud_tpu` in this field. Learn more about the [special configuration options for training
  with
  TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAcceleratorConfig

Configuration (count and accelerator type) for hardware running notebook
execution.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V1.ExecutionTemplate.SchedulerAcceleratorConfig|null` |   |

### hasAcceleratorConfig

### clearAcceleratorConfig

### setAcceleratorConfig

Configuration (count and accelerator type) for hardware running notebook
execution.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V1.ExecutionTemplate.SchedulerAcceleratorConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLabels

Labels for execution.

If execution is scheduled, a field included will be 'nbs-scheduled'.
Otherwise, it is an immediate execution, and an included field will be
'nbs-immediate'. Use fields to efficiently index between various types of
executions.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setLabels

Labels for execution.

If execution is scheduled, a field included will be 'nbs-scheduled'.
Otherwise, it is an immediate execution, and an included field will be
'nbs-immediate'. Use fields to efficiently index between various types of
executions.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getInputNotebookFile

Path to the notebook file to execute.

Must be in a Google Cloud Storage bucket.
Format: `gs://{bucket_name}/{folder}/{notebook_file_name}`
Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setInputNotebookFile

Path to the notebook file to execute.

Must be in a Google Cloud Storage bucket.
Format: `gs://{bucket_name}/{folder}/{notebook_file_name}`
Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getContainerImageUri

Container Image URI to a DLVM
Example: 'gcr.io/deeplearning-platform-release/base-cu100'
More examples can be found at:
<https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container>

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setContainerImageUri

Container Image URI to a DLVM
Example: 'gcr.io/deeplearning-platform-release/base-cu100'
More examples can be found at:
<https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container>

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getOutputNotebookFolder

Path to the notebook folder to write to.

Must be in a Google Cloud Storage bucket path.
Format: `gs://{bucket_name}/{folder}`
Ex: `gs://notebook_user/scheduled_notebooks`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setOutputNotebookFolder

Path to the notebook folder to write to.

Must be in a Google Cloud Storage bucket path.
Format: `gs://{bucket_name}/{folder}`
Ex: `gs://notebook_user/scheduled_notebooks`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getParamsYamlFile

Parameters to be overridden in the notebook during execution.

Ref <https://papermill.readthedocs.io/en/latest/usage-parameterize.html> on
how to specifying parameters in the input notebook and pass them here
in an YAML file.
Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setParamsYamlFile

Parameters to be overridden in the notebook during execution.

Ref <https://papermill.readthedocs.io/en/latest/usage-parameterize.html> on
how to specifying parameters in the input notebook and pass them here
in an YAML file.
Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getParameters

Parameters used within the 'input_notebook_file' notebook.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setParameters

Parameters used within the 'input_notebook_file' notebook.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getServiceAccount

The email address of a service account to use when running the execution.

You must have the `iam.serviceAccounts.actAs` permission for the specified
service account.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setServiceAccount

The email address of a service account to use when running the execution.

You must have the `iam.serviceAccounts.actAs` permission for the specified
service account.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getJobType

The type of Job to be used on this execution.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [JobType](https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V1.ExecutionTemplate.JobType). |

### setJobType

The type of Job to be used on this execution.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [JobType](https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V1.ExecutionTemplate.JobType). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDataprocParameters

Parameters used in Dataproc JobType executions.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V1.ExecutionTemplate.DataprocParameters|null` |   |

### hasDataprocParameters

### setDataprocParameters

Parameters used in Dataproc JobType executions.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V1.ExecutionTemplate.DataprocParameters` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVertexAiParameters

Parameters used in Vertex AI JobType executions.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V1.ExecutionTemplate.VertexAIParameters|null` |   |

### hasVertexAiParameters

### setVertexAiParameters

Parameters used in Vertex AI JobType executions.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V1.ExecutionTemplate.VertexAIParameters` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getKernelSpec

Name of the kernel spec to use. This must be specified if the
kernel spec name on the execution target does not match the name in the
input notebook file.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setKernelSpec

Name of the kernel spec to use. This must be specified if the
kernel spec name on the execution target does not match the name in the
input notebook file.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTensorboard

The name of a Vertex AI \[Tensorboard\] resource to which this execution
will upload Tensorboard logs.

Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setTensorboard

The name of a Vertex AI \[Tensorboard\] resource to which this execution
will upload Tensorboard logs.

Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getJobParameters

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |