Class: Google::Apis::NotebooksV1::ExecutionTemplate

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ExecutionTemplate

Returns a new instance of ExecutionTemplate.



489
490
491
# File 'lib/google/apis/notebooks_v1/classes.rb', line 489

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#accelerator_configGoogle::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



421
422
423
# File 'lib/google/apis/notebooks_v1/classes.rb', line 421

def accelerator_config
  @accelerator_config
end

#container_image_uriString

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

Returns:

  • (String)


428
429
430
# File 'lib/google/apis/notebooks_v1/classes.rb', line 428

def container_image_uri
  @container_image_uri
end

#input_notebook_fileString

Path to the notebook file to execute. Must be in a Google Cloud Storage bucket. Format: gs://project_id/folder/notebook_file_name Ex: gs:// notebook_user/scheduled_notebooks/sentiment_notebook.ipynb Corresponds to the JSON property inputNotebookFile

Returns:

  • (String)


435
436
437
# File 'lib/google/apis/notebooks_v1/classes.rb', line 435

def input_notebook_file
  @input_notebook_file
end

#labelsHash<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

Returns:

  • (Hash<String,String>)


443
444
445
# File 'lib/google/apis/notebooks_v1/classes.rb', line 443

def labels
  @labels
end

#master_typeString

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

Returns:

  • (String)


462
463
464
# File 'lib/google/apis/notebooks_v1/classes.rb', line 462

def master_type
  @master_type
end

#output_notebook_folderString

Path to the notebook folder to write to. Must be in a Google Cloud Storage bucket path. Format: gs://project_id/folder Ex: gs://notebook_user/ scheduled_notebooks Corresponds to the JSON property outputNotebookFolder

Returns:

  • (String)


469
470
471
# File 'lib/google/apis/notebooks_v1/classes.rb', line 469

def output_notebook_folder
  @output_notebook_folder
end

#parametersString

Parameters used within the 'input_notebook_file' notebook. Corresponds to the JSON property parameters

Returns:

  • (String)


474
475
476
# File 'lib/google/apis/notebooks_v1/classes.rb', line 474

def parameters
  @parameters
end

#params_yaml_fileString

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

Returns:

  • (String)


482
483
484
# File 'lib/google/apis/notebooks_v1/classes.rb', line 482

def params_yaml_file
  @params_yaml_file
end

#scale_tierString

Required. Scale tier of the hardware used for notebook execution. Corresponds to the JSON property scaleTier

Returns:

  • (String)


487
488
489
# File 'lib/google/apis/notebooks_v1/classes.rb', line 487

def scale_tier
  @scale_tier
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



494
495
496
497
498
499
500
501
502
503
504
# File 'lib/google/apis/notebooks_v1/classes.rb', line 494

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)
  @input_notebook_file = args[:input_notebook_file] if args.key?(:input_notebook_file)
  @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)
end