Class: Google::Apis::MlV1::GoogleCloudMlV1TrainingInput
- Inherits:
-
Object
- Object
- Google::Apis::MlV1::GoogleCloudMlV1TrainingInput
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/ml_v1/classes.rb,
generated/google/apis/ml_v1/representations.rb,
generated/google/apis/ml_v1/representations.rb
Overview
Represents input parameters for a training job. When using the gcloud command to submit your training job, you can specify the input parameters as command-line arguments and/or in a YAML configuration file referenced from the --config command-line argument. For details, see the guide to submitting a training job.
Instance Attribute Summary collapse
-
#args ⇒ Array<String>
Optional.
-
#hyperparameters ⇒ Google::Apis::MlV1::GoogleCloudMlV1HyperparameterSpec
Represents a set of hyperparameters to optimize.
-
#job_dir ⇒ String
Optional.
-
#master_config ⇒ Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig
Represents the configuration for a replica in a cluster.
-
#master_type ⇒ String
Optional.
-
#package_uris ⇒ Array<String>
Required.
-
#parameter_server_config ⇒ Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig
Represents the configuration for a replica in a cluster.
-
#parameter_server_count ⇒ Fixnum
Optional.
-
#parameter_server_type ⇒ String
Optional.
-
#python_module ⇒ String
Required.
-
#python_version ⇒ String
Optional.
-
#region ⇒ String
Required.
-
#runtime_version ⇒ String
Optional.
-
#scale_tier ⇒ String
Required.
-
#scheduling ⇒ Google::Apis::MlV1::GoogleCloudMlV1Scheduling
All parameters related to scheduling of training jobs.
-
#use_chief_in_tf_config ⇒ Boolean
(also: #use_chief_in_tf_config?)
Optional.
-
#worker_config ⇒ Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig
Represents the configuration for a replica in a cluster.
-
#worker_count ⇒ Fixnum
Optional.
-
#worker_type ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudMlV1TrainingInput
constructor
A new instance of GoogleCloudMlV1TrainingInput.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ GoogleCloudMlV1TrainingInput
Returns a new instance of GoogleCloudMlV1TrainingInput.
1659 1660 1661 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1659 def initialize(**args) update!(**args) end |
Instance Attribute Details
#args ⇒ Array<String>
Optional. Command line arguments to pass to the program.
Corresponds to the JSON property args
1470 1471 1472 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1470 def args @args end |
#hyperparameters ⇒ Google::Apis::MlV1::GoogleCloudMlV1HyperparameterSpec
Represents a set of hyperparameters to optimize.
Corresponds to the JSON property hyperparameters
1475 1476 1477 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1475 def hyperparameters @hyperparameters end |
#job_dir ⇒ String
Optional. A Google Cloud Storage path in which to store training outputs
and other data needed for training. This path is passed to your TensorFlow
program as the '--job-dir' command-line argument. The benefit of specifying
this field is that Cloud ML validates the path for use in training.
Corresponds to the JSON property jobDir
1483 1484 1485 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1483 def job_dir @job_dir end |
#master_config ⇒ Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig
Represents the configuration for a replica in a cluster.
Corresponds to the JSON property masterConfig
1488 1489 1490 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1488 def master_config @master_config end |
#master_type ⇒ String
Optional. 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-4n1-standard-8n1-standard-16n1-standard-32n1-standard-64n1-standard-96n1-highmem-2n1-highmem-4n1-highmem-8n1-highmem-16n1-highmem-32n1-highmem-64n1-highmem-96n1-highcpu-16n1-highcpu-32n1-highcpu-64n1-highcpu-96Learn more about using Compute Engine machine types. Alternatively, you can use the following legacy machine types:standardlarge_modelcomplex_model_scomplex_model_mcomplex_model_lstandard_gpucomplex_model_m_gpucomplex_model_l_gpustandard_p100complex_model_m_p100standard_v100large_model_v100complex_model_m_v100complex_model_l_v100Learn more about using legacy machine types. Finally, if you want to use a TPU for training, specifycloud_tpuin this field. Learn more about the special configuration options for training with TPUs. Corresponds to the JSON propertymasterType
1537 1538 1539 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1537 def master_type @master_type end |
#package_uris ⇒ Array<String>
Required. The Google Cloud Storage location of the packages with
the training program and any additional dependencies.
The maximum number of package URIs is 100.
Corresponds to the JSON property packageUris
1544 1545 1546 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1544 def package_uris @package_uris end |
#parameter_server_config ⇒ Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig
Represents the configuration for a replica in a cluster.
Corresponds to the JSON property parameterServerConfig
1549 1550 1551 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1549 def parameter_server_config @parameter_server_config end |
#parameter_server_count ⇒ Fixnum
Optional. The number of parameter server replicas to use for the training
job. Each replica in the cluster will be of the type specified in
parameter_server_type.
This value can only be used when scale_tier is set to CUSTOM.If you
set this value, you must also set parameter_server_type.
The default value is zero.
Corresponds to the JSON property parameterServerCount
1559 1560 1561 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1559 def parameter_server_count @parameter_server_count end |
#parameter_server_type ⇒ String
Optional. Specifies the type of virtual machine to use for your training
job's parameter server.
The supported values are the same as those described in the entry for
master_type.
This value must be consistent with the category of machine type that
masterType uses. In other words, both must be Compute Engine machine
types or both must be legacy machine types.
This value must be present when scaleTier is set to CUSTOM and
parameter_server_count is greater than zero.
Corresponds to the JSON property parameterServerType
1572 1573 1574 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1572 def parameter_server_type @parameter_server_type end |
#python_module ⇒ String
Required. The Python module name to run after installing the packages.
Corresponds to the JSON property pythonModule
1577 1578 1579 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1577 def python_module @python_module end |
#python_version ⇒ String
Optional. The version of Python used in training. You must either specify
this field or specify masterConfig.imageUri.
The following Python versions are available:
- Python '3.7' is available when
runtime_versionis set to '1.15' or later. - Python '3.5' is available when
runtime_versionis set to a version from '1.4' to '1.14'. - Python '2.7' is available when
runtime_versionis set to '1.15' or earlier. Read more about the Python versions available for each runtime version. Corresponds to the JSON propertypythonVersion
1592 1593 1594 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1592 def python_version @python_version end |
#region ⇒ String
Required. The region to run the training job in. See the available
regions for AI Platform Training.
Corresponds to the JSON property region
1598 1599 1600 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1598 def region @region end |
#runtime_version ⇒ String
Optional. The AI Platform runtime version to use for training. You must
either specify this field or specify masterConfig.imageUri.
For more information, see the runtime version
list and learn how to
manage runtime versions.
Corresponds to the JSON property runtimeVersion
1607 1608 1609 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1607 def runtime_version @runtime_version end |
#scale_tier ⇒ String
Required. Specifies the machine types, the number of replicas for workers
and parameter servers.
Corresponds to the JSON property scaleTier
1613 1614 1615 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1613 def scale_tier @scale_tier end |
#scheduling ⇒ Google::Apis::MlV1::GoogleCloudMlV1Scheduling
All parameters related to scheduling of training jobs.
Corresponds to the JSON property scheduling
1618 1619 1620 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1618 def scheduling @scheduling end |
#use_chief_in_tf_config ⇒ Boolean Also known as: use_chief_in_tf_config?
Optional. Use 'chief' instead of 'master' in TF_CONFIG when Custom
Container is used and evaluator is not specified.
Defaults to false.
Corresponds to the JSON property useChiefInTfConfig
1625 1626 1627 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1625 def use_chief_in_tf_config @use_chief_in_tf_config end |
#worker_config ⇒ Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig
Represents the configuration for a replica in a cluster.
Corresponds to the JSON property workerConfig
1631 1632 1633 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1631 def worker_config @worker_config end |
#worker_count ⇒ Fixnum
Optional. The number of worker replicas to use for the training job. Each
replica in the cluster will be of the type specified in worker_type.
This value can only be used when scale_tier is set to CUSTOM. If you
set this value, you must also set worker_type.
The default value is zero.
Corresponds to the JSON property workerCount
1640 1641 1642 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1640 def worker_count @worker_count end |
#worker_type ⇒ String
Optional. Specifies the type of virtual machine to use for your training
job's worker nodes.
The supported values are the same as those described in the entry for
masterType.
This value must be consistent with the category of machine type that
masterType uses. In other words, both must be Compute Engine machine
types or both must be legacy machine types.
If you use cloud_tpu for this value, see special instructions for
configuring a custom TPU
machine.
This value must be present when scaleTier is set to CUSTOM and
workerCount is greater than zero.
Corresponds to the JSON property workerType
1657 1658 1659 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1657 def worker_type @worker_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1664 def update!(**args) @args = args[:args] if args.key?(:args) @hyperparameters = args[:hyperparameters] if args.key?(:hyperparameters) @job_dir = args[:job_dir] if args.key?(:job_dir) @master_config = args[:master_config] if args.key?(:master_config) @master_type = args[:master_type] if args.key?(:master_type) @package_uris = args[:package_uris] if args.key?(:package_uris) @parameter_server_config = args[:parameter_server_config] if args.key?(:parameter_server_config) @parameter_server_count = args[:parameter_server_count] if args.key?(:parameter_server_count) @parameter_server_type = args[:parameter_server_type] if args.key?(:parameter_server_type) @python_module = args[:python_module] if args.key?(:python_module) @python_version = args[:python_version] if args.key?(:python_version) @region = args[:region] if args.key?(:region) @runtime_version = args[:runtime_version] if args.key?(:runtime_version) @scale_tier = args[:scale_tier] if args.key?(:scale_tier) @scheduling = args[:scheduling] if args.key?(:scheduling) @use_chief_in_tf_config = args[:use_chief_in_tf_config] if args.key?(:use_chief_in_tf_config) @worker_config = args[:worker_config] if args.key?(:worker_config) @worker_count = args[:worker_count] if args.key?(:worker_count) @worker_type = args[:worker_type] if args.key?(:worker_type) end |