Class: Google::Apis::MlV1::GoogleCloudMlV1PredictionInput
- Inherits:
-
Object
- Object
- Google::Apis::MlV1::GoogleCloudMlV1PredictionInput
- 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 prediction job. Next field: 20
Instance Attribute Summary collapse
-
#accelerator ⇒ Google::Apis::MlV1::GoogleCloudMlV1AcceleratorConfig
Represents a hardware accelerator request config.
-
#batch_size ⇒ Fixnum
Optional.
-
#data_format ⇒ String
Required.
-
#input_paths ⇒ Array<String>
Required.
-
#max_worker_count ⇒ Fixnum
Optional.
-
#model_name ⇒ String
Use this field if you want to use the default version for the specified model.
-
#output_data_format ⇒ String
Optional.
-
#output_path ⇒ String
Required.
-
#region ⇒ String
Required.
-
#runtime_version ⇒ String
Optional.
-
#signature_name ⇒ String
Optional.
-
#uri ⇒ String
Use this field if you want to specify a Google Cloud Storage path for the model to use.
-
#version_name ⇒ String
Use this field if you want to specify a version of the model to use.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudMlV1PredictionInput
constructor
A new instance of GoogleCloudMlV1PredictionInput.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ GoogleCloudMlV1PredictionInput
Returns a new instance of GoogleCloudMlV1PredictionInput
1023 1024 1025 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1023 def initialize(**args) update!(**args) end |
Instance Attribute Details
#accelerator ⇒ Google::Apis::MlV1::GoogleCloudMlV1AcceleratorConfig
Represents a hardware accelerator request config.
Corresponds to the JSON property accelerator
937 938 939 |
# File 'generated/google/apis/ml_v1/classes.rb', line 937 def accelerator @accelerator end |
#batch_size ⇒ Fixnum
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
945 946 947 |
# File 'generated/google/apis/ml_v1/classes.rb', line 945 def batch_size @batch_size end |
#data_format ⇒ String
Required. The format of the input data files.
Corresponds to the JSON property dataFormat
950 951 952 |
# File 'generated/google/apis/ml_v1/classes.rb', line 950 def data_format @data_format end |
#input_paths ⇒ Array<String>
Required. The Google Cloud Storage location of the input data files.
May contain wildcards.
Corresponds to the JSON property inputPaths
956 957 958 |
# File 'generated/google/apis/ml_v1/classes.rb', line 956 def input_paths @input_paths end |
#max_worker_count ⇒ Fixnum
Optional. The maximum number of workers to be used for parallel processing.
Defaults to 10 if not specified.
Corresponds to the JSON property maxWorkerCount
962 963 964 |
# File 'generated/google/apis/ml_v1/classes.rb', line 962 def max_worker_count @max_worker_count end |
#model_name ⇒ String
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
969 970 971 |
# File 'generated/google/apis/ml_v1/classes.rb', line 969 def model_name @model_name end |
#output_data_format ⇒ String
Optional. Format of the output data files, defaults to JSON.
Corresponds to the JSON property outputDataFormat
974 975 976 |
# File 'generated/google/apis/ml_v1/classes.rb', line 974 def output_data_format @output_data_format end |
#output_path ⇒ String
Required. The output Google Cloud Storage location.
Corresponds to the JSON property outputPath
979 980 981 |
# File 'generated/google/apis/ml_v1/classes.rb', line 979 def output_path @output_path end |
#region ⇒ String
Required. The Google Compute Engine region to run the prediction job in.
See the available regions
for ML Engine services.
Corresponds to the JSON property region
986 987 988 |
# File 'generated/google/apis/ml_v1/classes.rb', line 986 def region @region end |
#runtime_version ⇒ String
Optional. The Cloud ML Engine runtime version to use for this batch
prediction. If not set, Cloud ML Engine 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
995 996 997 |
# File 'generated/google/apis/ml_v1/classes.rb', line 995 def runtime_version @runtime_version end |
#signature_name ⇒ String
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
1007 1008 1009 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1007 def signature_name @signature_name end |
#uri ⇒ String
Use this field if you want to specify a Google Cloud Storage path for
the model to use.
Corresponds to the JSON property uri
1013 1014 1015 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1013 def uri @uri end |
#version_name ⇒ String
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
1021 1022 1023 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1021 def version_name @version_name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1028 def update!(**args) @accelerator = args[:accelerator] if args.key?(:accelerator) @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 |