InputConfig

Stay organized with collections Save and categorize content based on your preferences.

The configuration of input data, including data type, location, etc.

JSON representation
{
  "dataType": enum (DataType),
  "annotationType": enum (AnnotationType),
  "classificationMetadata": {
    object (ClassificationMetadata)
  },
  "textMetadata": {
    object (TextMetadata)
  },

  // Union field source can be only one of the following:
  "gcsSource": {
    object (GcsSource)
  },
  "bigquerySource": {
    object (BigQuerySource)
  }
  // End of list of possible types for union field source.
}
Fields
dataType

enum (DataType)

Required. Data type must be specifed when user tries to import data.

annotationType

enum (AnnotationType)

Optional. The type of annotation to be performed on this data. You must specify this field if you are using this InputConfig in an EvaluationJob.

classificationMetadata

object (ClassificationMetadata)

Optional. Metadata about annotations for the input. You must specify this field if you are using this InputConfig in an EvaluationJob for a model version that performs classification.

textMetadata

object (TextMetadata)

Required for text import, as language code must be specified.

Union field source. Required. Where the data is from. source can be only one of the following:
gcsSource

object (GcsSource)

Source located in Cloud Storage.

bigquerySource

object (BigQuerySource)

Source located in BigQuery. You must specify this field if you are using this InputConfig in an EvaluationJob.

TextMetadata

Metadata for the text.

JSON representation
{
  "languageCode": string
}
Fields
languageCode

string

The language of this text, as a BCP-47. Default value is en-US.

GcsSource

Source of the Cloud Storage file to be imported.

JSON representation
{
  "inputUri": string,
  "mimeType": string
}
Fields
inputUri

string

Required. The input URI of source file. This must be a Cloud Storage path (gs://...).

mimeType

string

Required. The format of the source file. Only "text/csv" is supported.

BigQuerySource

The BigQuery location for input data. If used in an EvaluationJob, this is where the service saves the prediction input and output sampled from the model version.

JSON representation
{
  "inputUri": string
}
Fields
inputUri

string

Required. BigQuery URI to a table, up to 2,000 characters long. If you specify the URI of a table that does not exist, Data Labeling Service creates a table at the URI with the correct schema when you create your EvaluationJob. If you specify the URI of a table that already exists, it must have the correct schema.

Provide the table URI in the following format:

"bq://{your_project_id}/{your_dataset_name}/{your_table_name}"

Learn more.

ClassificationMetadata

Metadata for classification annotations.

JSON representation
{
  "isMultiLabel": boolean
}
Fields
isMultiLabel

boolean

Whether the classification task is multi-label or not.