Class: Google::Apis::MlV1::GoogleCloudMlV1TrainingInput

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ GoogleCloudMlV1TrainingInput

Returns a new instance of GoogleCloudMlV1TrainingInput



1495
1496
1497
# File 'generated/google/apis/ml_v1/classes.rb', line 1495

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

Instance Attribute Details

#argsArray<String>

Optional. Command line arguments to pass to the program. Corresponds to the JSON property args

Returns:

  • (Array<String>)


1473
1474
1475
# File 'generated/google/apis/ml_v1/classes.rb', line 1473

def args
  @args
end

#hyperparametersGoogle::Apis::MlV1::GoogleCloudMlV1HyperparameterSpec

Represents a set of hyperparameters to optimize. Corresponds to the JSON property hyperparameters



1379
1380
1381
# File 'generated/google/apis/ml_v1/classes.rb', line 1379

def hyperparameters
  @hyperparameters
end

#job_dirString

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

Returns:

  • (String)


1374
1375
1376
# File 'generated/google/apis/ml_v1/classes.rb', line 1374

def job_dir
  @job_dir
end

#master_typeString

Optional. Specifies the type of virtual machine to use for your training job's master worker. The following types are supported:

standard
A basic machine configuration suitable for training simple models with small to moderate datasets.
large_model
A machine with a lot of memory, specially suited for parameter servers when your model is large (having many hidden layers or layers with very large numbers of nodes).
complex_model_s
A machine suitable for the master and workers of the cluster when your model requires more computation than the standard machine can handle satisfactorily.
complex_model_m
A machine with roughly twice the number of cores and roughly double the memory of complex_model_s.
complex_model_l
A machine with roughly twice the number of cores and roughly double the memory of complex_model_m.
standard_gpu
A machine equivalent to standard that also includes a GPU that you can use in your trainer.
complex_model_m_gpu
A machine equivalent to coplex_model_m that also includes four GPUs.

You must set this value when scaleTier is set to CUSTOM. Corresponds to the JSON property masterType

Returns:

  • (String)


1452
1453
1454
# File 'generated/google/apis/ml_v1/classes.rb', line 1452

def master_type
  @master_type
end

#package_urisArray<String>

Required. The Google Cloud Storage location of the packages with the training program and any additional dependencies. Corresponds to the JSON property packageUris

Returns:

  • (Array<String>)


1394
1395
1396
# File 'generated/google/apis/ml_v1/classes.rb', line 1394

def package_uris
  @package_uris
end

#parameter_server_countString

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. Corresponds to the JSON property parameterServerCount

Returns:

  • (String)


1388
1389
1390
# File 'generated/google/apis/ml_v1/classes.rb', line 1388

def parameter_server_count
  @parameter_server_count
end

#parameter_server_typeString

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 present when scaleTier is set to CUSTOM and parameter_server_count is greater than zero. Corresponds to the JSON property parameterServerType

Returns:

  • (String)


1493
1494
1495
# File 'generated/google/apis/ml_v1/classes.rb', line 1493

def parameter_server_type
  @parameter_server_type
end

#python_moduleString

Required. The Python module name to run after installing the packages. Corresponds to the JSON property pythonModule

Returns:

  • (String)


1463
1464
1465
# File 'generated/google/apis/ml_v1/classes.rb', line 1463

def python_module
  @python_module
end

#regionString

Required. The Google Compute Engine region to run the training job in. Corresponds to the JSON property region

Returns:

  • (String)


1468
1469
1470
# File 'generated/google/apis/ml_v1/classes.rb', line 1468

def region
  @region
end

#runtime_versionString

Optional. The Google Cloud ML runtime version to use for training. If not set, Google Cloud ML will choose the latest stable version. Corresponds to the JSON property runtimeVersion

Returns:

  • (String)


1458
1459
1460
# File 'generated/google/apis/ml_v1/classes.rb', line 1458

def runtime_version
  @runtime_version
end

#scale_tierString

Required. Specifies the machine types, the number of replicas for workers and parameter servers. Corresponds to the JSON property scaleTier

Returns:

  • (String)


1366
1367
1368
# File 'generated/google/apis/ml_v1/classes.rb', line 1366

def scale_tier
  @scale_tier
end

#worker_countString

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. Corresponds to the JSON property workerCount

Returns:

  • (String)


1402
1403
1404
# File 'generated/google/apis/ml_v1/classes.rb', line 1402

def worker_count
  @worker_count
end

#worker_typeString

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 present when scaleTier is set to CUSTOM and workerCount is greater than zero. Corresponds to the JSON property workerType

Returns:

  • (String)


1483
1484
1485
# File 'generated/google/apis/ml_v1/classes.rb', line 1483

def worker_type
  @worker_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
# File 'generated/google/apis/ml_v1/classes.rb', line 1500

def update!(**args)
  @scale_tier = args[:scale_tier] if args.key?(:scale_tier)
  @job_dir = args[:job_dir] if args.key?(:job_dir)
  @hyperparameters = args[:hyperparameters] if args.key?(:hyperparameters)
  @parameter_server_count = args[:parameter_server_count] if args.key?(:parameter_server_count)
  @package_uris = args[:package_uris] if args.key?(:package_uris)
  @worker_count = args[:worker_count] if args.key?(:worker_count)
  @master_type = args[:master_type] if args.key?(:master_type)
  @runtime_version = args[:runtime_version] if args.key?(:runtime_version)
  @python_module = args[:python_module] if args.key?(:python_module)
  @region = args[:region] if args.key?(:region)
  @args = args[:args] if args.key?(:args)
  @worker_type = args[:worker_type] if args.key?(:worker_type)
  @parameter_server_type = args[:parameter_server_type] if args.key?(:parameter_server_type)
end