Class: Google::Apis::MlV1::GoogleCloudMlV1PredictionInput

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/ml_v1/classes.rb,
lib/google/apis/ml_v1/representations.rb,
lib/google/apis/ml_v1/representations.rb

Overview

Represents input parameters for a prediction job.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudMlV1PredictionInput

Returns a new instance of GoogleCloudMlV1PredictionInput.



2069
2070
2071
# File 'lib/google/apis/ml_v1/classes.rb', line 2069

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

Instance Attribute Details

#batch_sizeFixnum

Optional. Number of records per batch, defaults to 64. The service will buffer batch_size number of records in memory before invoking one Tensorflow prediction call internally. So take the record size and memory available into consideration when setting this parameter. Corresponds to the JSON property batchSize

Returns:

  • (Fixnum)


1995
1996
1997
# File 'lib/google/apis/ml_v1/classes.rb', line 1995

def batch_size
  @batch_size
end

#data_formatString

Required. The format of the input data files. Corresponds to the JSON property dataFormat

Returns:

  • (String)


2000
2001
2002
# File 'lib/google/apis/ml_v1/classes.rb', line 2000

def data_format
  @data_format
end

#input_pathsArray<String>

Required. The Cloud Storage location of the input data files. May contain wildcards. Corresponds to the JSON property inputPaths

Returns:

  • (Array<String>)


2006
2007
2008
# File 'lib/google/apis/ml_v1/classes.rb', line 2006

def input_paths
  @input_paths
end

#max_worker_countFixnum

Optional. The maximum number of workers to be used for parallel processing. Defaults to 10 if not specified. Corresponds to the JSON property maxWorkerCount

Returns:

  • (Fixnum)


2012
2013
2014
# File 'lib/google/apis/ml_v1/classes.rb', line 2012

def max_worker_count
  @max_worker_count
end

#model_nameString

Use this field if you want to use the default version for the specified model. The string must use the following format: "projects/YOUR_PROJECT/models/ YOUR_MODEL" Corresponds to the JSON property modelName

Returns:

  • (String)


2019
2020
2021
# File 'lib/google/apis/ml_v1/classes.rb', line 2019

def model_name
  @model_name
end

#output_data_formatString

Optional. Format of the output data files, defaults to JSON. Corresponds to the JSON property outputDataFormat

Returns:

  • (String)


2024
2025
2026
# File 'lib/google/apis/ml_v1/classes.rb', line 2024

def output_data_format
  @output_data_format
end

#output_pathString

Required. The output Google Cloud Storage location. Corresponds to the JSON property outputPath

Returns:

  • (String)


2029
2030
2031
# File 'lib/google/apis/ml_v1/classes.rb', line 2029

def output_path
  @output_path
end

#regionString

Required. The Google Compute Engine region to run the prediction job in. See the available regions for AI Platform services. Corresponds to the JSON property region

Returns:

  • (String)


2035
2036
2037
# File 'lib/google/apis/ml_v1/classes.rb', line 2035

def region
  @region
end

#runtime_versionString

Optional. The AI Platform runtime version to use for this batch prediction. If not set, AI Platform will pick the runtime version used during the CreateVersion request for this model version, or choose the latest stable version when model version information is not available such as when the model is specified by uri. Corresponds to the JSON property runtimeVersion

Returns:

  • (String)


2044
2045
2046
# File 'lib/google/apis/ml_v1/classes.rb', line 2044

def runtime_version
  @runtime_version
end

#signature_nameString

Optional. The name of the signature defined in the SavedModel to use for this job. Please refer to SavedModel for information about how to use signatures. Defaults to DEFAULT_SERVING_SIGNATURE_DEF_KEY , which is "serving_default". Corresponds to the JSON property signatureName

Returns:

  • (String)


2053
2054
2055
# File 'lib/google/apis/ml_v1/classes.rb', line 2053

def signature_name
  @signature_name
end

#uriString

Use this field if you want to specify a Google Cloud Storage path for the model to use. Corresponds to the JSON property uri

Returns:

  • (String)


2059
2060
2061
# File 'lib/google/apis/ml_v1/classes.rb', line 2059

def uri
  @uri
end

#version_nameString

Use this field if you want to specify a version of the model to use. The string is formatted the same way as model_version, with the addition of the version information: "projects/YOUR_PROJECT/models/YOUR_MODEL/versions/ YOUR_VERSION" Corresponds to the JSON property versionName

Returns:

  • (String)


2067
2068
2069
# File 'lib/google/apis/ml_v1/classes.rb', line 2067

def version_name
  @version_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
# File 'lib/google/apis/ml_v1/classes.rb', line 2074

def update!(**args)
  @batch_size = args[:batch_size] if args.key?(:batch_size)
  @data_format = args[:data_format] if args.key?(:data_format)
  @input_paths = args[:input_paths] if args.key?(:input_paths)
  @max_worker_count = args[:max_worker_count] if args.key?(:max_worker_count)
  @model_name = args[:model_name] if args.key?(:model_name)
  @output_data_format = args[:output_data_format] if args.key?(:output_data_format)
  @output_path = args[:output_path] if args.key?(:output_path)
  @region = args[:region] if args.key?(:region)
  @runtime_version = args[:runtime_version] if args.key?(:runtime_version)
  @signature_name = args[:signature_name] if args.key?(:signature_name)
  @uri = args[:uri] if args.key?(:uri)
  @version_name = args[:version_name] if args.key?(:version_name)
end