- 2.51.0 (latest)
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.18
- 2.2.3
- 2.1.23
public final class BatchPredictOutputConfig extends GeneratedMessageV3 implements BatchPredictOutputConfigOrBuilder
Output configuration for BatchPredict Action.
As destination the
gcs_destination must be set unless specified otherwise for a domain. If gcs_destination is set then in the given directory a new directory is created. Its name will be "prediction-<model-display-name>-<timestamp-of-prediction-call>", where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents of it depends on the ML problem the predictions are made for. * For Image Classification: In the created directory filesimage_classification_1.jsonl
,
image_classification_2.jsonl
,...,image_classification_N.jsonl
will be created, where N may be 1, and depends on the
total number of the successfully predicted images and annotations.
A single image will be listed only once with all its annotations,
and its annotations will never be split across files.
Each .JSONL file will contain, per line, a JSON representation of a
proto that wraps image's "ID" : "<id_value>" followed by a list of
zero or more AnnotationPayload protos (called annotations), which
have classification detail populated.
If prediction for any image failed (partially or completely), then an
additional errors_1.jsonl
, errors_2.jsonl
,..., errors_N.jsonl
files will be created (N depends on total number of failed
predictions). These files will have a JSON representation of a proto
that wraps the same "ID" : "<id_value>" but here followed by
exactly one
google.rpc.Status
containing only code
and message
fields.
* For Image Object Detection:
In the created directory files image_object_detection_1.jsonl
,
image_object_detection_2.jsonl
,...,image_object_detection_N.jsonl
will be created, where N may be 1, and depends on the
total number of the successfully predicted images and annotations.
Each .JSONL file will contain, per line, a JSON representation of a
proto that wraps image's "ID" : "<id_value>" followed by a list of
zero or more AnnotationPayload protos (called annotations), which
have image_object_detection detail populated. A single image will
be listed only once with all its annotations, and its annotations
will never be split across files.
If prediction for any image failed (partially or completely), then
additional errors_1.jsonl
, errors_2.jsonl
,..., errors_N.jsonl
files will be created (N depends on total number of failed
predictions). These files will have a JSON representation of a proto
that wraps the same "ID" : "<id_value>" but here followed by
exactly one
google.rpc.Status
containing only code
and message
fields.
* For Video Classification:
In the created directory a video_classification.csv file, and a .JSON
file per each video classification requested in the input (i.e. each
line in given CSV(s)), will be created.
The format of video_classification.csv is:
GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS
where:
GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1
the prediction input lines (i.e. video_classification.csv has
precisely the same number of lines as the prediction input had.)
JSON_FILE_NAME = Name of .JSON file in the output directory, which
contains prediction responses for the video time segment.
STATUS = "OK" if prediction completed successfully, or an error code
with message otherwise. If STATUS is not "OK" then the .JSON file
for that line may not exist or be empty.
Each .JSON file, assuming STATUS is "OK", will contain a list of
AnnotationPayload protos in JSON format, which are the predictions
for the video time segment the file is assigned to in the
video_classification.csv. All AnnotationPayload protos will have
video_classification field set, and will be sorted by
video_classification.type field (note that the returned types are
governed by classifaction_types
parameter in
[PredictService.BatchPredictRequest.params][]).
* For Video Object Tracking:
In the created directory a video_object_tracking.csv file will be
created, and multiple files video_object_trackinng_1.json,
video_object_trackinng_2.json,..., video_object_trackinng_N.json,
where N is the number of requests in the input (i.e. the number of
lines in given CSV(s)).
The format of video_object_tracking.csv is:
GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS
where:
GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1
the prediction input lines (i.e. video_object_tracking.csv has
precisely the same number of lines as the prediction input had.)
JSON_FILE_NAME = Name of .JSON file in the output directory, which
contains prediction responses for the video time segment.
STATUS = "OK" if prediction completed successfully, or an error
code with message otherwise. If STATUS is not "OK" then the .JSON
file for that line may not exist or be empty.
Each .JSON file, assuming STATUS is "OK", will contain a list of
AnnotationPayload protos in JSON format, which are the predictions
for each frame of the video time segment the file is assigned to in
video_object_tracking.csv. All AnnotationPayload protos will have
video_object_tracking field set.
* For Text Classification:
In the created directory files text_classification_1.jsonl
,
text_classification_2.jsonl
,...,text_classification_N.jsonl
will be created, where N may be 1, and depends on the
total number of inputs and annotations found.
Each .JSONL file will contain, per line, a JSON representation of a
proto that wraps input text snippet or input text file and a list of
zero or more AnnotationPayload protos (called annotations), which
have classification detail populated. A single text snippet or file
will be listed only once with all its annotations, and its
annotations will never be split across files.
If prediction for any text snippet or file failed (partially or
completely), then additional errors_1.jsonl
, errors_2.jsonl
,...,
errors_N.jsonl
files will be created (N depends on total number of
failed predictions). These files will have a JSON representation of a
proto that wraps input text snippet or input text file followed by
exactly one
google.rpc.Status
containing only code
and message
.
* For Text Sentiment:
In the created directory files text_sentiment_1.jsonl
,
text_sentiment_2.jsonl
,...,text_sentiment_N.jsonl
will be created, where N may be 1, and depends on the
total number of inputs and annotations found.
Each .JSONL file will contain, per line, a JSON representation of a
proto that wraps input text snippet or input text file and a list of
zero or more AnnotationPayload protos (called annotations), which
have text_sentiment detail populated. A single text snippet or file
will be listed only once with all its annotations, and its
annotations will never be split across files.
If prediction for any text snippet or file failed (partially or
completely), then additional errors_1.jsonl
, errors_2.jsonl
,...,
errors_N.jsonl
files will be created (N depends on total number of
failed predictions). These files will have a JSON representation of a
proto that wraps input text snippet or input text file followed by
exactly one
google.rpc.Status
containing only code
and message
.
* For Text Extraction:
In the created directory files text_extraction_1.jsonl
,
text_extraction_2.jsonl
,...,text_extraction_N.jsonl
will be created, where N may be 1, and depends on the
total number of inputs and annotations found.
The contents of these .JSONL file(s) depend on whether the input
used inline text, or documents.
If input was inline, then each .JSONL file will contain, per line,
a JSON representation of a proto that wraps given in request text
snippet's "id" (if specified), followed by input text snippet,
and a list of zero or more
AnnotationPayload protos (called annotations), which have
text_extraction detail populated. A single text snippet will be
listed only once with all its annotations, and its annotations will
never be split across files.
If input used documents, then each .JSONL file will contain, per
line, a JSON representation of a proto that wraps given in request
document proto, followed by its OCR-ed representation in the form
of a text snippet, finally followed by a list of zero or more
AnnotationPayload protos (called annotations), which have
text_extraction detail populated and refer, via their indices, to
the OCR-ed text snippet. A single document (and its text snippet)
will be listed only once with all its annotations, and its
annotations will never be split across files.
If prediction for any text snippet failed (partially or completely),
then additional errors_1.jsonl
, errors_2.jsonl
,...,
errors_N.jsonl
files will be created (N depends on total number of
failed predictions). These files will have a JSON representation of a
proto that wraps either the "id" : "<id_value>" (in case of inline)
or the document proto (in case of document) but here followed by
exactly one
google.rpc.Status
containing only code
and message
.
* For Tables:
Output depends on whether
gcs_destination
or
bigquery_destination
is set (either is allowed).
GCS case:
In the created directory files tables_1.csv
, tables_2.csv
,...,
tables_N.csv
will be created, where N may be 1, and depends on
the total number of the successfully predicted rows.
For all CLASSIFICATION
prediction_type-s:
Each .csv file will contain a header, listing all columns'
display_name-s
given on input followed by M target column names in the format of
"<target_column_specs
display_name><target
value>_score" where M is the number of distinct target values,
i.e. number of distinct values in the target column of the table
used to train the model. Subsequent lines will contain the
respective values of successfully predicted rows, with the last,
i.e. the target, columns having the corresponding prediction
scores.
For REGRESSION and FORECASTING
prediction_type-s:
Each .csv file will contain a header, listing all columns'
display_name-s given
on input followed by the predicted target column with name in the
format of
"predicted<target_column_specs
display_name>"
Subsequent lines will contain the respective values of
successfully predicted rows, with the last, i.e. the target,
column having the predicted target value.
If prediction for any rows failed, then an additional
errors_1.csv
, errors_2.csv
,..., errors_N.csv
will be
created (N depends on total number of failed rows). These files
will have analogous format as tables_*.csv
, but always with a
single target column having
google.rpc.Status
represented as a JSON string, and containing only code
and
message
.
BigQuery case:
bigquery_destination
pointing to a BigQuery project must be set. In the given project a
new dataset will be created with name
prediction_<model-display-name><timestamp-of-prediction-call>
where <model-display-name> will be made
BigQuery-dataset-name compatible (e.g. most special characters will
become underscores), and timestamp will be in
YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
two tables will be created, predictions
, and errors
.
The predictions
table's column names will be the input columns'
display_name-s
followed by the target column with name in the format of
"predicted<target_column_specs
display_name>"
The input feature columns will contain the respective values of
successfully predicted rows, with the target column having an
ARRAY of
AnnotationPayloads,
represented as STRUCT-s, containing
TablesAnnotation.
The errors
table contains rows for which the prediction has
failed, it has analogous input columns while the target column name
is in the format of
"errors_<target_column_specs
display_name>", and as a value has
google.rpc.Status
represented as a STRUCT, and containing only code
and message
.
Protobuf type google.cloud.automl.v1beta1.BatchPredictOutputConfig
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > BatchPredictOutputConfigImplements
BatchPredictOutputConfigOrBuilderStatic Fields
BIGQUERY_DESTINATION_FIELD_NUMBER
public static final int BIGQUERY_DESTINATION_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
GCS_DESTINATION_FIELD_NUMBER
public static final int GCS_DESTINATION_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
Static Methods
getDefaultInstance()
public static BatchPredictOutputConfig getDefaultInstance()
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
newBuilder()
public static BatchPredictOutputConfig.Builder newBuilder()
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig.Builder |
newBuilder(BatchPredictOutputConfig prototype)
public static BatchPredictOutputConfig.Builder newBuilder(BatchPredictOutputConfig prototype)
Parameter | |
---|---|
Name | Description |
prototype |
BatchPredictOutputConfig |
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig.Builder |
parseDelimitedFrom(InputStream input)
public static BatchPredictOutputConfig parseDelimitedFrom(InputStream input)
Parameter | |
---|---|
Name | Description |
input |
InputStream |
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig |
Exceptions | |
---|---|
Type | Description |
IOException |
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static BatchPredictOutputConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(byte[] data)
public static BatchPredictOutputConfig parseFrom(byte[] data)
Parameter | |
---|---|
Name | Description |
data |
byte[] |
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static BatchPredictOutputConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data |
byte[] |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data)
public static BatchPredictOutputConfig parseFrom(ByteString data)
Parameter | |
---|---|
Name | Description |
data |
ByteString |
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static BatchPredictOutputConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data |
ByteString |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(CodedInputStream input)
public static BatchPredictOutputConfig parseFrom(CodedInputStream input)
Parameter | |
---|---|
Name | Description |
input |
CodedInputStream |
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static BatchPredictOutputConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(InputStream input)
public static BatchPredictOutputConfig parseFrom(InputStream input)
Parameter | |
---|---|
Name | Description |
input |
InputStream |
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static BatchPredictOutputConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(ByteBuffer data)
public static BatchPredictOutputConfig parseFrom(ByteBuffer data)
Parameter | |
---|---|
Name | Description |
data |
ByteBuffer |
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static BatchPredictOutputConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data |
ByteBuffer |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parser()
public static Parser<BatchPredictOutputConfig> parser()
Returns | |
---|---|
Type | Description |
Parser<BatchPredictOutputConfig> |
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter | |
---|---|
Name | Description |
obj |
Object |
Returns | |
---|---|
Type | Description |
boolean |
getBigqueryDestination()
public BigQueryDestination getBigqueryDestination()
The BigQuery location where the output is to be written to.
.google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2;
Returns | |
---|---|
Type | Description |
BigQueryDestination |
The bigqueryDestination. |
getBigqueryDestinationOrBuilder()
public BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder()
The BigQuery location where the output is to be written to.
.google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2;
Returns | |
---|---|
Type | Description |
BigQueryDestinationOrBuilder |
getDefaultInstanceForType()
public BatchPredictOutputConfig getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig |
getDestinationCase()
public BatchPredictOutputConfig.DestinationCase getDestinationCase()
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig.DestinationCase |
getGcsDestination()
public GcsDestination getGcsDestination()
The Google Cloud Storage location of the directory where the output is to be written to.
.google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1;
Returns | |
---|---|
Type | Description |
GcsDestination |
The gcsDestination. |
getGcsDestinationOrBuilder()
public GcsDestinationOrBuilder getGcsDestinationOrBuilder()
The Google Cloud Storage location of the directory where the output is to be written to.
.google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1;
Returns | |
---|---|
Type | Description |
GcsDestinationOrBuilder |
getParserForType()
public Parser<BatchPredictOutputConfig> getParserForType()
Returns | |
---|---|
Type | Description |
Parser<BatchPredictOutputConfig> |
getSerializedSize()
public int getSerializedSize()
Returns | |
---|---|
Type | Description |
int |
hasBigqueryDestination()
public boolean hasBigqueryDestination()
The BigQuery location where the output is to be written to.
.google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2;
Returns | |
---|---|
Type | Description |
boolean |
Whether the bigqueryDestination field is set. |
hasGcsDestination()
public boolean hasGcsDestination()
The Google Cloud Storage location of the directory where the output is to be written to.
.google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1;
Returns | |
---|---|
Type | Description |
boolean |
Whether the gcsDestination field is set. |
hashCode()
public int hashCode()
Returns | |
---|---|
Type | Description |
int |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
newBuilderForType()
public BatchPredictOutputConfig.Builder newBuilderForType()
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected BatchPredictOutputConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter | |
---|---|
Name | Description |
parent |
BuilderParent |
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig.Builder |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter | |
---|---|
Name | Description |
unused |
UnusedPrivateParameter |
Returns | |
---|---|
Type | Description |
Object |
toBuilder()
public BatchPredictOutputConfig.Builder toBuilder()
Returns | |
---|---|
Type | Description |
BatchPredictOutputConfig.Builder |
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter | |
---|---|
Name | Description |
output |
CodedOutputStream |
Exceptions | |
---|---|
Type | Description |
IOException |