Class: Google::Apis::NotebooksV1::ExecutionTemplate
- Inherits:
-
Object
- Object
- Google::Apis::NotebooksV1::ExecutionTemplate
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/notebooks_v1/classes.rb,
lib/google/apis/notebooks_v1/representations.rb,
lib/google/apis/notebooks_v1/representations.rb
Overview
The description a notebook execution workload.
Instance Attribute Summary collapse
-
#accelerator_config ⇒ Google::Apis::NotebooksV1::SchedulerAcceleratorConfig
Definition of a hardware accelerator.
-
#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 Corresponds to the JSON property
containerImageUri. -
#dataproc_parameters ⇒ Google::Apis::NotebooksV1::DataprocParameters
Parameters used in Dataproc JobType executions.
-
#input_notebook_file ⇒ String
Path to the notebook file to execute.
-
#job_type ⇒ String
The type of Job to be used on this execution.
-
#kernel_spec ⇒ String
Name of the kernel spec to use.
-
#labels ⇒ Hash<String,String>
Labels for execution.
-
#master_type ⇒ String
Specifies the type of virtual machine to use for your training job's master worker.
-
#output_notebook_folder ⇒ String
Path to the notebook folder to write to.
-
#parameters ⇒ String
Parameters used within the 'input_notebook_file' notebook.
-
#params_yaml_file ⇒ String
Parameters to be overridden in the notebook during execution.
-
#scale_tier ⇒ String
Required.
-
#service_account ⇒ String
The email address of a service account to use when running the execution.
-
#tensorboard ⇒ String
The name of a Vertex AI [Tensorboard] resource to which this execution will upload Tensorboard logs.
-
#vertex_ai_parameters ⇒ Google::Apis::NotebooksV1::VertexAiParameters
Parameters used in Vertex AI JobType executions.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ExecutionTemplate
constructor
A new instance of ExecutionTemplate.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ExecutionTemplate
Returns a new instance of ExecutionTemplate.
624 625 626 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 624 def initialize(**args) update!(**args) end |
Instance Attribute Details
#accelerator_config ⇒ Google::Apis::NotebooksV1::SchedulerAcceleratorConfig
Definition of a hardware accelerator. Note that not all combinations of type
and core_count are valid. Check GPUs on Compute Engine to find a valid combination. TPUs are not
supported.
Corresponds to the JSON property acceleratorConfig
519 520 521 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 519 def accelerator_config @accelerator_config end |
#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
Corresponds to the JSON property containerImageUri
526 527 528 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 526 def container_image_uri @container_image_uri end |
#dataproc_parameters ⇒ Google::Apis::NotebooksV1::DataprocParameters
Parameters used in Dataproc JobType executions.
Corresponds to the JSON property dataprocParameters
531 532 533 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 531 def dataproc_parameters @dataproc_parameters end |
#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
Corresponds to the JSON propertyinputNotebookFile`
538 539 540 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 538 def input_notebook_file @input_notebook_file end |
#job_type ⇒ String
The type of Job to be used on this execution.
Corresponds to the JSON property jobType
543 544 545 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 543 def job_type @job_type end |
#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.
Corresponds to the JSON property kernelSpec
549 550 551 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 549 def kernel_spec @kernel_spec end |
#labels ⇒ Hash<String,String>
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.
Corresponds to the JSON property labels
557 558 559 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 557 def labels @labels end |
#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.
Corresponds to the JSON property masterType
577 578 579 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 577 def master_type @master_type end |
#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
Corresponds to the JSON propertyoutputNotebookFolder`
584 585 586 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 584 def output_notebook_folder @output_notebook_folder end |
#parameters ⇒ String
Parameters used within the 'input_notebook_file' notebook.
Corresponds to the JSON property parameters
589 590 591 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 589 def parameters @parameters end |
#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
Corresponds to the JSON property paramsYamlFile
597 598 599 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 597 def params_yaml_file @params_yaml_file end |
#scale_tier ⇒ String
Required. Scale tier of the hardware used for notebook execution. DEPRECATED
Will be discontinued. As right now only CUSTOM is supported.
Corresponds to the JSON property scaleTier
603 604 605 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 603 def scale_tier @scale_tier end |
#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.
Corresponds to the JSON property serviceAccount
610 611 612 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 610 def service_account @service_account end |
#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`
Corresponds to the JSON propertytensorboard`
617 618 619 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 617 def tensorboard @tensorboard end |
#vertex_ai_parameters ⇒ Google::Apis::NotebooksV1::VertexAiParameters
Parameters used in Vertex AI JobType executions.
Corresponds to the JSON property vertexAiParameters
622 623 624 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 622 def vertex_ai_parameters @vertex_ai_parameters end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 629 def update!(**args) @accelerator_config = args[:accelerator_config] if args.key?(:accelerator_config) @container_image_uri = args[:container_image_uri] if args.key?(:container_image_uri) @dataproc_parameters = args[:dataproc_parameters] if args.key?(:dataproc_parameters) @input_notebook_file = args[:input_notebook_file] if args.key?(:input_notebook_file) @job_type = args[:job_type] if args.key?(:job_type) @kernel_spec = args[:kernel_spec] if args.key?(:kernel_spec) @labels = args[:labels] if args.key?(:labels) @master_type = args[:master_type] if args.key?(:master_type) @output_notebook_folder = args[:output_notebook_folder] if args.key?(:output_notebook_folder) @parameters = args[:parameters] if args.key?(:parameters) @params_yaml_file = args[:params_yaml_file] if args.key?(:params_yaml_file) @scale_tier = args[:scale_tier] if args.key?(:scale_tier) @service_account = args[:service_account] if args.key?(:service_account) @tensorboard = args[:tensorboard] if args.key?(:tensorboard) @vertex_ai_parameters = args[:vertex_ai_parameters] if args.key?(:vertex_ai_parameters) end |