jobs
Creates, updates, deletes, gets or lists a jobs
resource.
Overview
Name | jobs |
Type | Resource |
Id | google.ml.jobs |
Fields
Name | Datatype | Description |
---|---|---|
createTime | string | Output only. When the job was created. |
endTime | string | Output only. When the job processing was completed. |
errorMessage | string | Output only. The details of a failure or a cancellation. |
etag | string | 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 GetJob , and systems are expected to put that etag in the request to UpdateJob to ensure that their change will be applied to the same version of the job. |
jobId | string | Required. The user-specified id of the job. |
jobPosition | string | Output only. It's only effect when the job is in QUEUED state. If it's positive, it indicates the job's position in the job scheduler. It's 0 when the job is already scheduled. |
labels | object | 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. |
predictionInput | object | Represents input parameters for a prediction job. |
predictionOutput | object | Represents results of a prediction job. |
startTime | string | Output only. When the job processing was started. |
state | string | Output only. The detailed state of a job. |
trainingInput | object | Represents input parameters for a training job. When using the gcloud command to submit your training job, you can specify the input parameters as command-line arguments and/or in a YAML configuration file referenced from the --config command-line argument. For details, see the guide to submitting a training job. |
trainingOutput | object | Represents results of a training job. Output only. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_jobs_get | SELECT | jobsId, projectsId | Describes a job. |
projects_jobs_list | SELECT | projectsId | Lists the jobs in the project. If there are no jobs that match the request parameters, the list request returns an empty response body: {}. |
projects_jobs_create | INSERT | projectsId | Creates a training or a batch prediction job. |
projects_jobs_patch | UPDATE | jobsId, projectsId | Updates a specific job resource. Currently the only supported fields to update are labels . |
projects_jobs_cancel | EXEC | jobsId, projectsId | Cancels a running job. |
SELECT
examples
Lists the jobs in the project. If there are no jobs that match the request parameters, the list request returns an empty response body: {}.
SELECT
createTime,
endTime,
errorMessage,
etag,
jobId,
jobPosition,
labels,
predictionInput,
predictionOutput,
startTime,
state,
trainingInput,
trainingOutput
FROM google.ml.jobs
WHERE projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new jobs
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.ml.jobs (
projectsId,
jobId,
trainingInput,
predictionInput,
startTime,
endTime,
state,
errorMessage,
trainingOutput,
predictionOutput,
labels,
etag
)
SELECT
'{{ projectsId }}',
'{{ jobId }}',
'{{ trainingInput }}',
'{{ predictionInput }}',
'{{ startTime }}',
'{{ endTime }}',
'{{ state }}',
'{{ errorMessage }}',
'{{ trainingOutput }}',
'{{ predictionOutput }}',
'{{ labels }}',
'{{ etag }}'
;
- name: your_resource_model_name
props:
- name: jobId
value: string
- name: trainingInput
value:
- name: scaleTier
value: string
- name: masterType
value: string
- name: masterConfig
value:
- name: acceleratorConfig
value:
- name: count
value: string
- name: type
value: string
- name: imageUri
value: string
- name: tpuTfVersion
value: string
- name: diskConfig
value:
- name: bootDiskType
value: string
- name: bootDiskSizeGb
value: integer
- name: containerCommand
value:
- string
- name: containerArgs
value:
- string
- name: workerType
value: string
- name: parameterServerType
value: string
- name: evaluatorType
value: string
- name: workerCount
value: string
- name: parameterServerCount
value: string
- name: evaluatorCount
value: string
- name: packageUris
value:
- string
- name: pythonModule
value: string
- name: args
value:
- string
- name: hyperparameters
value:
- name: goal
value: string
- name: params
value:
- - name: parameterName
value: string
- name: type
value: string
- name: minValue
value: number
- name: maxValue
value: number
- name: categoricalValues
value:
- string
- name: discreteValues
value:
- number
- name: scaleType
value: string
- name: maxTrials
value: integer
- name: maxParallelTrials
value: integer
- name: maxFailedTrials
value: integer
- name: hyperparameterMetricTag
value: string
- name: resumePreviousJobId
value: string
- name: enableTrialEarlyStopping
value: boolean
- name: algorithm
value: string
- name: region
value: string
- name: jobDir
value: string
- name: runtimeVersion
value: string
- name: pythonVersion
value: string
- name: encryptionConfig
value:
- name: kmsKeyName
value: string
- name: scheduling
value:
- name: maxRunningTime
value: string
- name: maxWaitTime
value: string
- name: priority
value: integer
- name: network
value: string
- name: serviceAccount
value: string
- name: useChiefInTfConfig
value: boolean
- name: enableWebAccess
value: boolean
- name: predictionInput
value:
- name: modelName
value: string
- name: versionName
value: string
- name: uri
value: string
- name: dataFormat
value: string
- name: outputDataFormat
value: string
- name: inputPaths
value:
- string
- name: outputPath
value: string
- name: maxWorkerCount
value: string
- name: region
value: string
- name: runtimeVersion
value: string
- name: batchSize
value: string
- name: signatureName
value: string
- name: createTime
value: string
- name: startTime
value: string
- name: endTime
value: string
- name: state
value: string
- name: errorMessage
value: string
- name: trainingOutput
value:
- name: completedTrialCount
value: string
- name: trials
value:
- - name: trialId
value: string
- name: hyperparameters
value: object
- name: startTime
value: string
- name: endTime
value: string
- name: state
value: string
- name: finalMetric
value:
- name: trainingStep
value: string
- name: objectiveValue
value: number
- name: isTrialStoppedEarly
value: boolean
- name: allMetrics
value:
- - name: trainingStep
value: string
- name: objectiveValue
value: number
- name: builtInAlgorithmOutput
value:
- name: framework
value: string
- name: runtimeVersion
value: string
- name: pythonVersion
value: string
- name: modelPath
value: string
- name: webAccessUris
value: object
- name: consumedMLUnits
value: number
- name: isHyperparameterTuningJob
value: boolean
- name: isBuiltInAlgorithmJob
value: boolean
- name: hyperparameterMetricTag
value: string
- name: webAccessUris
value: object
- name: predictionOutput
value:
- name: outputPath
value: string
- name: predictionCount
value: string
- name: errorCount
value: string
- name: nodeHours
value: number
- name: labels
value: object
- name: etag
value: string
- name: jobPosition
value: string
UPDATE
example
Updates a jobs
resource.
/*+ update */
UPDATE google.ml.jobs
SET
jobId = '{{ jobId }}',
trainingInput = '{{ trainingInput }}',
predictionInput = '{{ predictionInput }}',
startTime = '{{ startTime }}',
endTime = '{{ endTime }}',
state = '{{ state }}',
errorMessage = '{{ errorMessage }}',
trainingOutput = '{{ trainingOutput }}',
predictionOutput = '{{ predictionOutput }}',
labels = '{{ labels }}',
etag = '{{ etag }}'
WHERE
jobsId = '{{ jobsId }}'
AND projectsId = '{{ projectsId }}';