REST Resource: projects.jobs

Resource: Job

Represents a training or prediction job.

JSON representation
{
  "jobId": string,
  "createTime": string,
  "startTime": string,
  "endTime": string,
  "state": enum (State),
  "errorMessage": string,
  "labels": {
    string: string,
    ...
  },
  "etag": string,
  "predictionInput": {
    object (PredictionInput)
  },
  "predictionOutput": {
    object (PredictionOutput)
  }
}
Fields
jobId

string

Required. The user-specified id of the job.

createTime

string (Timestamp format)

Output only. When the job was created.

startTime

string (Timestamp format)

Output only. When the job processing was started.

endTime

string (Timestamp format)

Output only. When the job processing was completed.

state

enum (State)

Output only. The detailed state of a job.

errorMessage

string

Output only. The details of a failure or a cancellation.

labels

map (key: string, value: string)

Optional. One or more labels that you can add, to organize your jobs. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

etag

string (bytes format)

etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a job from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform job updates in order to avoid race conditions: An etag is returned in the response to jobs.get, and systems are expected to put that etag in the request to jobs.patch to ensure that their change will be applied to the same version of the job.

A base64-encoded string.

predictionInput

object (PredictionInput)

Input parameters to create a prediction job.

predictionOutput

object (PredictionOutput)

The current prediction job result.

PredictionInput

Represents input parameters for a prediction job.

JSON representation
{
  "dataFormat": enum (DataFormat),
  "outputDataFormat": enum (DataFormat),
  "inputPaths": [
    string
  ],
  "maxWorkerCount": string,
  "region": string,
  "runtimeVersion": string,
  "batchSize": string,
  "signatureName": string,

  // Union field model_version can be only one of the following:
  "modelName": string,
  "versionName": string,
  "uri": string
  // End of list of possible types for union field model_version.
  "outputPath": string
}
Fields
dataFormat

enum (DataFormat)

Required. The format of the input data files.

outputDataFormat

enum (DataFormat)

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

inputPaths[]

string

Required. The Cloud Storage location of the input data files. May contain wildcards.

maxWorkerCount

string (int64 format)

Optional. The maximum number of workers to be used for parallel processing. Defaults to 10 if not specified.

region

string

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

runtimeVersion

string

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 versions.create 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.

batchSize

string (int64 format)

Optional. Number of records per batch, defaults to 64. The service will buffer batchSize 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.

signatureName

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".

Union field model_version. Required. The model or the version to use for prediction. model_version can be only one of the following:
modelName

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"

versionName

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"

uri

string

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

outputPath

string

Required. The output Google Cloud Storage location.

DataFormat

The format used to separate data instances in the source and destination files.

Enums
DATA_FORMAT_UNSPECIFIED Unspecified format.
JSON Each line of the file is a JSON dictionary representing one record.
TEXT Deprecated. Use JSON instead.
TF_RECORD The source file is a TFRecord file. Currently available only for input data.
TF_RECORD_GZIP The source file is a GZIP-compressed TFRecord file. Currently available only for input data.
CSV Values are comma-separated rows, with keys in a separate file. Currently available only for output data.

State

Describes the job state.

Enums
STATE_UNSPECIFIED The job state is unspecified.
QUEUED The job has been just created and processing has not yet begun.
PREPARING The service is preparing to run the job.
RUNNING The job is in progress.
SUCCEEDED The job completed successfully.
FAILED The job failed. errorMessage should contain the details of the failure.
CANCELLING The job is being cancelled. errorMessage should describe the reason for the cancellation.
CANCELLED The job has been cancelled. errorMessage should describe the reason for the cancellation.

PredictionOutput

Represents results of a prediction job.

JSON representation
{
  "outputPath": string,
  "predictionCount": string,
  "errorCount": string,
  "nodeHours": number
}
Fields
outputPath

string

The output Google Cloud Storage location provided at the job creation time.

predictionCount

string (int64 format)

The number of generated predictions.

errorCount

string (int64 format)

The number of data instances which resulted in errors.

nodeHours

number

Node hours used by the batch prediction job.

Methods

cancel

Cancels a running job.

create

Creates a training or a batch prediction job.

get

Describes a job.

getIamPolicy

Gets the access control policy for a resource.

list

Lists the jobs in the project.

patch

Updates a specific job resource.

setIamPolicy

Sets the access control policy on the specified resource.

testIamPermissions

Returns permissions that a caller has on the specified resource.