Class ExecutionTemplate (1.35.0)

public final class ExecutionTemplate extends GeneratedMessageV3 implements ExecutionTemplateOrBuilder

The description a notebook execution workload.

Protobuf type google.cloud.notebooks.v1.ExecutionTemplate

Static Fields

ACCELERATOR_CONFIG_FIELD_NUMBER

public static final int ACCELERATOR_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

CONTAINER_IMAGE_URI_FIELD_NUMBER

public static final int CONTAINER_IMAGE_URI_FIELD_NUMBER
Field Value
TypeDescription
int

DATAPROC_PARAMETERS_FIELD_NUMBER

public static final int DATAPROC_PARAMETERS_FIELD_NUMBER
Field Value
TypeDescription
int

INPUT_NOTEBOOK_FILE_FIELD_NUMBER

public static final int INPUT_NOTEBOOK_FILE_FIELD_NUMBER
Field Value
TypeDescription
int

JOB_TYPE_FIELD_NUMBER

public static final int JOB_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

KERNEL_SPEC_FIELD_NUMBER

public static final int KERNEL_SPEC_FIELD_NUMBER
Field Value
TypeDescription
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
TypeDescription
int

MASTER_TYPE_FIELD_NUMBER

public static final int MASTER_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

OUTPUT_NOTEBOOK_FOLDER_FIELD_NUMBER

public static final int OUTPUT_NOTEBOOK_FOLDER_FIELD_NUMBER
Field Value
TypeDescription
int

PARAMETERS_FIELD_NUMBER

public static final int PARAMETERS_FIELD_NUMBER
Field Value
TypeDescription
int

PARAMS_YAML_FILE_FIELD_NUMBER

public static final int PARAMS_YAML_FILE_FIELD_NUMBER
Field Value
TypeDescription
int

SCALE_TIER_FIELD_NUMBER

public static final int SCALE_TIER_FIELD_NUMBER
Field Value
TypeDescription
int

SERVICE_ACCOUNT_FIELD_NUMBER

public static final int SERVICE_ACCOUNT_FIELD_NUMBER
Field Value
TypeDescription
int

TENSORBOARD_FIELD_NUMBER

public static final int TENSORBOARD_FIELD_NUMBER
Field Value
TypeDescription
int

VERTEX_AI_PARAMETERS_FIELD_NUMBER

public static final int VERTEX_AI_PARAMETERS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ExecutionTemplate getDefaultInstance()
Returns
TypeDescription
ExecutionTemplate

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static ExecutionTemplate.Builder newBuilder()
Returns
TypeDescription
ExecutionTemplate.Builder

newBuilder(ExecutionTemplate prototype)

public static ExecutionTemplate.Builder newBuilder(ExecutionTemplate prototype)
Parameter
NameDescription
prototypeExecutionTemplate
Returns
TypeDescription
ExecutionTemplate.Builder

parseDelimitedFrom(InputStream input)

public static ExecutionTemplate parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ExecutionTemplate
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ExecutionTemplate parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ExecutionTemplate
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static ExecutionTemplate parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
ExecutionTemplate
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ExecutionTemplate parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ExecutionTemplate
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ExecutionTemplate parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
ExecutionTemplate
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ExecutionTemplate parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ExecutionTemplate
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ExecutionTemplate parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
ExecutionTemplate
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ExecutionTemplate parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ExecutionTemplate
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static ExecutionTemplate parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ExecutionTemplate
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ExecutionTemplate parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ExecutionTemplate
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static ExecutionTemplate parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
ExecutionTemplate
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ExecutionTemplate parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ExecutionTemplate
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<ExecutionTemplate> parser()
Returns
TypeDescription
Parser<ExecutionTemplate>

Methods

containsLabels(String key)

public boolean containsLabels(String key)

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.

map<string, string> labels = 4;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAcceleratorConfig()

public ExecutionTemplate.SchedulerAcceleratorConfig getAcceleratorConfig()

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

.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3;

Returns
TypeDescription
ExecutionTemplate.SchedulerAcceleratorConfig

The acceleratorConfig.

getAcceleratorConfigOrBuilder()

public ExecutionTemplate.SchedulerAcceleratorConfigOrBuilder getAcceleratorConfigOrBuilder()

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

.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3;

Returns
TypeDescription
ExecutionTemplate.SchedulerAcceleratorConfigOrBuilder

getContainerImageUri()

public String 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

string container_image_uri = 6;

Returns
TypeDescription
String

The containerImageUri.

getContainerImageUriBytes()

public ByteString getContainerImageUriBytes()

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

string container_image_uri = 6;

Returns
TypeDescription
ByteString

The bytes for containerImageUri.

getDataprocParameters()

public ExecutionTemplate.DataprocParameters getDataprocParameters()

Parameters used in Dataproc JobType executions.

.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12;

Returns
TypeDescription
ExecutionTemplate.DataprocParameters

The dataprocParameters.

getDataprocParametersOrBuilder()

public ExecutionTemplate.DataprocParametersOrBuilder getDataprocParametersOrBuilder()

Parameters used in Dataproc JobType executions.

.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12;

Returns
TypeDescription
ExecutionTemplate.DataprocParametersOrBuilder

getDefaultInstanceForType()

public ExecutionTemplate getDefaultInstanceForType()
Returns
TypeDescription
ExecutionTemplate

getInputNotebookFile()

public String 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

string input_notebook_file = 5;

Returns
TypeDescription
String

The inputNotebookFile.

getInputNotebookFileBytes()

public ByteString getInputNotebookFileBytes()

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

string input_notebook_file = 5;

Returns
TypeDescription
ByteString

The bytes for inputNotebookFile.

getJobParametersCase()

public ExecutionTemplate.JobParametersCase getJobParametersCase()
Returns
TypeDescription
ExecutionTemplate.JobParametersCase

getJobType()

public ExecutionTemplate.JobType getJobType()

The type of Job to be used on this execution.

.google.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11;

Returns
TypeDescription
ExecutionTemplate.JobType

The jobType.

getJobTypeValue()

public int getJobTypeValue()

The type of Job to be used on this execution.

.google.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11;

Returns
TypeDescription
int

The enum numeric value on the wire for jobType.

getKernelSpec()

public String 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.

string kernel_spec = 14;

Returns
TypeDescription
String

The kernelSpec.

getKernelSpecBytes()

public ByteString getKernelSpecBytes()

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.

string kernel_spec = 14;

Returns
TypeDescription
ByteString

The bytes for kernelSpec.

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

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.

map<string, string> labels = 4;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

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.

map<string, string> labels = 4;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

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.

map<string, string> labels = 4;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

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.

map<string, string> labels = 4;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMasterType()

public String 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.

string master_type = 2;

Returns
TypeDescription
String

The masterType.

getMasterTypeBytes()

public ByteString getMasterTypeBytes()

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.

string master_type = 2;

Returns
TypeDescription
ByteString

The bytes for masterType.

getOutputNotebookFolder()

public String 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

string output_notebook_folder = 7;

Returns
TypeDescription
String

The outputNotebookFolder.

getOutputNotebookFolderBytes()

public ByteString getOutputNotebookFolderBytes()

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

string output_notebook_folder = 7;

Returns
TypeDescription
ByteString

The bytes for outputNotebookFolder.

getParameters()

public String getParameters()

Parameters used within the 'input_notebook_file' notebook.

string parameters = 9;

Returns
TypeDescription
String

The parameters.

getParametersBytes()

public ByteString getParametersBytes()

Parameters used within the 'input_notebook_file' notebook.

string parameters = 9;

Returns
TypeDescription
ByteString

The bytes for parameters.

getParamsYamlFile()

public String 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

string params_yaml_file = 8;

Returns
TypeDescription
String

The paramsYamlFile.

getParamsYamlFileBytes()

public ByteString getParamsYamlFileBytes()

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

string params_yaml_file = 8;

Returns
TypeDescription
ByteString

The bytes for paramsYamlFile.

getParserForType()

public Parser<ExecutionTemplate> getParserForType()
Returns
TypeDescription
Parser<ExecutionTemplate>
Overrides

getScaleTier() (deprecated)

public ExecutionTemplate.ScaleTier getScaleTier()

Deprecated. google.cloud.notebooks.v1.ExecutionTemplate.scale_tier is deprecated. See google/cloud/notebooks/v1/execution.proto;l=151

Required. Scale tier of the hardware used for notebook execution. DEPRECATED Will be discontinued. As right now only CUSTOM is supported.

.google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1 [deprecated = true, (.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ExecutionTemplate.ScaleTier

The scaleTier.

getScaleTierValue() (deprecated)

public int getScaleTierValue()

Deprecated. google.cloud.notebooks.v1.ExecutionTemplate.scale_tier is deprecated. See google/cloud/notebooks/v1/execution.proto;l=151

Required. Scale tier of the hardware used for notebook execution. DEPRECATED Will be discontinued. As right now only CUSTOM is supported.

.google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1 [deprecated = true, (.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

The enum numeric value on the wire for scaleTier.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getServiceAccount()

public String 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.

string service_account = 10;

Returns
TypeDescription
String

The serviceAccount.

getServiceAccountBytes()

public ByteString getServiceAccountBytes()

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.

string service_account = 10;

Returns
TypeDescription
ByteString

The bytes for serviceAccount.

getTensorboard()

public String getTensorboard()

The name of a Vertex AI [Tensorboard] resource to which this execution will upload Tensorboard logs. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}

string tensorboard = 15 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The tensorboard.

getTensorboardBytes()

public ByteString getTensorboardBytes()

The name of a Vertex AI [Tensorboard] resource to which this execution will upload Tensorboard logs. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}

string tensorboard = 15 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for tensorboard.

getVertexAiParameters()

public ExecutionTemplate.VertexAIParameters getVertexAiParameters()

Parameters used in Vertex AI JobType executions.

.google.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13;

Returns
TypeDescription
ExecutionTemplate.VertexAIParameters

The vertexAiParameters.

getVertexAiParametersOrBuilder()

public ExecutionTemplate.VertexAIParametersOrBuilder getVertexAiParametersOrBuilder()

Parameters used in Vertex AI JobType executions.

.google.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13;

Returns
TypeDescription
ExecutionTemplate.VertexAIParametersOrBuilder

hasAcceleratorConfig()

public boolean hasAcceleratorConfig()

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

.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3;

Returns
TypeDescription
boolean

Whether the acceleratorConfig field is set.

hasDataprocParameters()

public boolean hasDataprocParameters()

Parameters used in Dataproc JobType executions.

.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12;

Returns
TypeDescription
boolean

Whether the dataprocParameters field is set.

hasVertexAiParameters()

public boolean hasVertexAiParameters()

Parameters used in Vertex AI JobType executions.

.google.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13;

Returns
TypeDescription
boolean

Whether the vertexAiParameters field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public ExecutionTemplate.Builder newBuilderForType()
Returns
TypeDescription
ExecutionTemplate.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ExecutionTemplate.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
ExecutionTemplate.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public ExecutionTemplate.Builder toBuilder()
Returns
TypeDescription
ExecutionTemplate.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException