---
title: "POST /v1/{+parent}/jobs"
method: POST
path: "/v1/{+parent}/jobs"
tags: ["projects"]
---

# POST /v1/{+parent}/jobs

`POST /v1/{+parent}/jobs`

Creates a training or a batch prediction job.

## Path parameters

- `parent` string, required

## Request body

- GoogleCloudMlV1Job — Represents a training or prediction job.
  - `jobPosition` string, int64 — 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.
  - `createTime` string, google-datetime — Output only. When the job was created.
  - `startTime` string, google-datetime — Output only. When the job processing was started.
  - `trainingInput` GoogleCloudMlV1TrainingInput — 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](/ai-platform/training/docs/training-jobs).
    - `packageUris` string[] — Required. The Google Cloud Storage location of the packages with the training program and any additional dependencies. The maximum number of package URIs is 100.
    - `scaleTier` 'BASIC' | 'STANDARD_1' | 'PREMIUM_1' | 'BASIC_GPU' | 'BASIC_TPU' | 'CUSTOM' — Required. Specifies the machine types, the number of replicas for workers and parameter servers.
    - `scheduling` GoogleCloudMlV1Scheduling — All parameters related to scheduling of training jobs.
      - `maxRunningTime` string, google-duration — Optional. The maximum job running time, expressed in seconds. The field can contain up to nine fractional digits, terminated by `s`. If not specified, this field defaults to `604800s` (seven days). If the training job is still running after this duration, AI Platform Training cancels it. The duration is measured from when the job enters the `RUNNING` state; therefore it does not overlap with the duration limited by Scheduling.max_wait_time. For example, if you want to ensure your job runs for no more than 2 hours, set this field to `7200s` (2 hours * 60 minutes / hour * 60 seconds / minute). If you submit your training job using the `gcloud` tool, you can [specify this field in a `config.yaml` file](/ai-platform/training/docs/training-jobs#formatting_your_configuration_parameters). For example: ```yaml trainingInput: scheduling: maxRunningTime: 7200s ```
      - `priority` integer — Optional. Job scheduling will be based on this priority, which in the range [0, 1000]. The bigger the number, the higher the priority. Default to 0 if not set. If there are multiple jobs requesting same type of accelerators, the high priority job will be scheduled prior to ones with low priority.
      - `maxWaitTime` string, google-duration — Optional. The maximum job wait time, expressed in seconds. The field can contain up to nine fractional digits, terminated by `s`. If not specified, there is no limit to the wait time. The minimum for this field is `1800s` (30 minutes). If the training job has not entered the `RUNNING` state after this duration, AI Platform Training cancels it. After the job begins running, it can no longer be cancelled due to the maximum wait time. Therefore the duration limited by this field does not overlap with the duration limited by Scheduling.max_running_time. For example, if the job temporarily stops running and retries due to a [VM restart](/ai-platform/training/docs/overview#restarts), this cannot lead to a maximum wait time cancellation. However, independently of this constraint, AI Platform Training might stop a job if there are too many retries due to exhausted resources in a region. The following example describes how you might use this field: To cancel your job if it doesn't start running within 1 hour, set this field to `3600s` (1 hour * 60 minutes / hour * 60 seconds / minute). If the job is still in the `QUEUED` or `PREPARING` state after an hour of waiting, AI Platform Training cancels the job. If you submit your training job using the `gcloud` tool, you can [specify this field in a `config.yaml` file](/ai-platform/training/docs/training-jobs#formatting_your_configuration_parameters). For example: ```yaml trainingInput: scheduling: maxWaitTime: 3600s ```
    - `workerCount` string, int64 — Optional. The number of worker replicas to use for the training job. Each replica in the cluster will be of the type specified in `worker_type`. This value can only be used when `scale_tier` is set to `CUSTOM`. If you set this value, you must also set `worker_type`. The default value is zero.
    - `encryptionConfig` GoogleCloudMlV1EncryptionConfig — Represents a custom encryption key configuration that can be applied to a resource.
      - `kmsKeyName` string — The Cloud KMS resource identifier of the customer-managed encryption key used to protect a resource, such as a training job. It has the following format: `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
    - `workerConfig` GoogleCloudMlV1ReplicaConfig — Represents the configuration for a replica in a cluster.
      - `tpuTfVersion` string — The AI Platform runtime version that includes a TensorFlow version matching the one used in the custom container. This field is required if the replica is a TPU worker that uses a custom container. Otherwise, do not specify this field. This must be a [runtime version that currently supports training with TPUs](/ml-engine/docs/tensorflow/runtime-version-list#tpu-support). Note that the version of TensorFlow included in a runtime version may differ from the numbering of the runtime version itself, because it may have a different [patch version](https://www.tensorflow.org/guide/version_compat#semantic_versioning_20). In this field, you must specify the runtime version (TensorFlow minor version). For example, if your custom container runs TensorFlow `1.x.y`, specify `1.x`.
      - `acceleratorConfig` GoogleCloudMlV1AcceleratorConfig — Represents a hardware accelerator request config. Note that the AcceleratorConfig can be used in both Jobs and Versions. Learn more about [accelerators for training](/ml-engine/docs/using-gpus) and [accelerators for online prediction](/ml-engine/docs/machine-types-online-prediction#gpus).
        - `count` string, int64 — The number of accelerators to attach to each machine running the job.
        - `type` 'ACCELERATOR_TYPE_UNSPECIFIED' | 'NVIDIA_TESLA_K80' | 'NVIDIA_TESLA_P100' | 'NVIDIA_TESLA_V100' | 'NVIDIA_TESLA_P4' | 'NVIDIA_TESLA_T4' | 'NVIDIA_TESLA_A100' | 'TPU_V2' | 'TPU_V3' | 'TPU_V2_POD' | 'TPU_V3_POD' | 'TPU_V4_POD' — The type of accelerator to use.
      - `diskConfig` GoogleCloudMlV1DiskConfig — Represents the config of disk options.
        - `bootDiskSizeGb` integer — Size in GB of the boot disk (default is 100GB).
        - `bootDiskType` string — Type of the boot disk (default is "pd-ssd"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive).
      - `imageUri` string — The Docker image to run on the replica. This image must be in Container Registry. Learn more about [configuring custom containers](/ai-platform/training/docs/distributed-training-containers).
      - `containerArgs` string[] — Arguments to the entrypoint command. The following rules apply for container_command and container_args: - If you do not supply command or args: The defaults defined in the Docker image are used. - If you supply a command but no args: The default EntryPoint and the default Cmd defined in the Docker image are ignored. Your command is run without any arguments. - If you supply only args: The default Entrypoint defined in the Docker image is run with the args that you supplied. - If you supply a command and args: The default Entrypoint and the default Cmd defined in the Docker image are ignored. Your command is run with your args. It cannot be set if custom container image is not provided. Note that this field and [TrainingInput.args] are mutually exclusive, i.e., both cannot be set at the same time.
      - `containerCommand` string[] — The command with which the replica's custom container is run. If provided, it will override default ENTRYPOINT of the docker image. If not provided, the docker image's ENTRYPOINT is used. It cannot be set if custom container image is not provided. Note that this field and [TrainingInput.args] are mutually exclusive, i.e., both cannot be set at the same time.
    - `evaluatorCount` string, int64 — Optional. The number of evaluator replicas to use for the training job. Each replica in the cluster will be of the type specified in `evaluator_type`. This value can only be used when `scale_tier` is set to `CUSTOM`. If you set this value, you must also set `evaluator_type`. The default value is zero.
    - `region` string — Required. The region to run the training job in. See the [available regions](/ai-platform/training/docs/regions) for AI Platform Training.
    - `network` string — Optional. The full name of the [Compute Engine network](/vpc/docs/vpc) to which the Job is peered. For example, `projects/12345/global/networks/myVPC`. The format of this field is `projects/{project}/global/networks/{network}`, where {project} is a project number (like `12345`) and {network} is network name. Private services access must already be configured for the network. If left unspecified, the Job is not peered with any network. [Learn about using VPC Network Peering.](/ai-platform/training/docs/vpc-peering).
    - `masterConfig` GoogleCloudMlV1ReplicaConfig — Represents the configuration for a replica in a cluster.
      - `tpuTfVersion` string — The AI Platform runtime version that includes a TensorFlow version matching the one used in the custom container. This field is required if the replica is a TPU worker that uses a custom container. Otherwise, do not specify this field. This must be a [runtime version that currently supports training with TPUs](/ml-engine/docs/tensorflow/runtime-version-list#tpu-support). Note that the version of TensorFlow included in a runtime version may differ from the numbering of the runtime version itself, because it may have a different [patch version](https://www.tensorflow.org/guide/version_compat#semantic_versioning_20). In this field, you must specify the runtime version (TensorFlow minor version). For example, if your custom container runs TensorFlow `1.x.y`, specify `1.x`.
      - `acceleratorConfig` GoogleCloudMlV1AcceleratorConfig — Represents a hardware accelerator request config. Note that the AcceleratorConfig can be used in both Jobs and Versions. Learn more about [accelerators for training](/ml-engine/docs/using-gpus) and [accelerators for online prediction](/ml-engine/docs/machine-types-online-prediction#gpus).
        - `count` string, int64 — The number of accelerators to attach to each machine running the job.
        - `type` 'ACCELERATOR_TYPE_UNSPECIFIED' | 'NVIDIA_TESLA_K80' | 'NVIDIA_TESLA_P100' | 'NVIDIA_TESLA_V100' | 'NVIDIA_TESLA_P4' | 'NVIDIA_TESLA_T4' | 'NVIDIA_TESLA_A100' | 'TPU_V2' | 'TPU_V3' | 'TPU_V2_POD' | 'TPU_V3_POD' | 'TPU_V4_POD' — The type of accelerator to use.
      - `diskConfig` GoogleCloudMlV1DiskConfig — Represents the config of disk options.
        - `bootDiskSizeGb` integer — Size in GB of the boot disk (default is 100GB).
        - `bootDiskType` string — Type of the boot disk (default is "pd-ssd"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive).
      - `imageUri` string — The Docker image to run on the replica. This image must be in Container Registry. Learn more about [configuring custom containers](/ai-platform/training/docs/distributed-training-containers).
      - `containerArgs` string[] — Arguments to the entrypoint command. The following rules apply for container_command and container_args: - If you do not supply command or args: The defaults defined in the Docker image are used. - If you supply a command but no args: The default EntryPoint and the default Cmd defined in the Docker image are ignored. Your command is run without any arguments. - If you supply only args: The default Entrypoint defined in the Docker image is run with the args that you supplied. - If you supply a command and args: The default Entrypoint and the default Cmd defined in the Docker image are ignored. Your command is run with your args. It cannot be set if custom container image is not provided. Note that this field and [TrainingInput.args] are mutually exclusive, i.e., both cannot be set at the same time.
      - `containerCommand` string[] — The command with which the replica's custom container is run. If provided, it will override default ENTRYPOINT of the docker image. If not provided, the docker image's ENTRYPOINT is used. It cannot be set if custom container image is not provided. Note that this field and [TrainingInput.args] are mutually exclusive, i.e., both cannot be set at the same time.
    - `hyperparameters` GoogleCloudMlV1HyperparameterSpec — Represents a set of hyperparameters to optimize.
      - `algorithm` 'ALGORITHM_UNSPECIFIED' | 'GRID_SEARCH' | 'RANDOM_SEARCH' — Optional. The search algorithm specified for the hyperparameter tuning job. Uses the default AI Platform hyperparameter tuning algorithm if unspecified.
      - `maxParallelTrials` integer — Optional. The number of training trials to run concurrently. You can reduce the time it takes to perform hyperparameter tuning by adding trials in parallel. However, each trail only benefits from the information gained in completed trials. That means that a trial does not get access to the results of trials running at the same time, which could reduce the quality of the overall optimization. Each trial will use the same scale tier and machine types. Defaults to one.
      - `resumePreviousJobId` string — Optional. The prior hyperparameter tuning job id that users hope to continue with. The job id will be used to find the corresponding vizier study guid and resume the study.
      - `maxFailedTrials` integer — Optional. The number of failed trials that need to be seen before failing the hyperparameter tuning job. You can specify this field to override the default failing criteria for AI Platform hyperparameter tuning jobs. Defaults to zero, which means the service decides when a hyperparameter job should fail.
      - `maxTrials` integer — Optional. How many training trials should be attempted to optimize the specified hyperparameters. Defaults to one.
      - `params` GoogleCloudMlV1ParameterSpec[] — Required. The set of parameters to tune.
        - `minValue` number, double — Required if type is `DOUBLE` or `INTEGER`. This field should be unset if type is `CATEGORICAL`. This value should be integers if type is INTEGER.
        - `discreteValues` number[] — Required if type is `DISCRETE`. A list of feasible points. The list should be in strictly increasing order. For instance, this parameter might have possible settings of 1.5, 2.5, and 4.0. This list should not contain more than 1,000 values.
        - `categoricalValues` string[] — Required if type is `CATEGORICAL`. The list of possible categories.
        - `maxValue` number, double — Required if type is `DOUBLE` or `INTEGER`. This field should be unset if type is `CATEGORICAL`. This value should be integers if type is `INTEGER`.
        - `type` 'PARAMETER_TYPE_UNSPECIFIED' | 'DOUBLE' | 'INTEGER' | 'CATEGORICAL' | 'DISCRETE' — Required. The type of the parameter.
        - `parameterName` string — Required. The parameter name must be unique amongst all ParameterConfigs in a HyperparameterSpec message. E.g., "learning_rate".
        - `scaleType` 'NONE' | 'UNIT_LINEAR_SCALE' | 'UNIT_LOG_SCALE' | 'UNIT_REVERSE_LOG_SCALE' — Optional. How the parameter should be scaled to the hypercube. Leave unset for categorical parameters. Some kind of scaling is strongly recommended for real or integral parameters (e.g., `UNIT_LINEAR_SCALE`).
      - `hyperparameterMetricTag` string — Optional. The TensorFlow summary tag name to use for optimizing trials. For current versions of TensorFlow, this tag name should exactly match what is shown in TensorBoard, including all scopes. For versions of TensorFlow prior to 0.12, this should be only the tag passed to tf.Summary. By default, "training/hptuning/metric" will be used.
      - `enableTrialEarlyStopping` boolean — Optional. Indicates if the hyperparameter tuning job enables auto trial early stopping.
      - `goal` 'GOAL_TYPE_UNSPECIFIED' | 'MAXIMIZE' | 'MINIMIZE' — Required. The type of goal to use for tuning. Available types are `MAXIMIZE` and `MINIMIZE`. Defaults to `MAXIMIZE`.
    - `serviceAccount` string — Optional. The email address of a service account to use when running the training appplication. You must have the `iam.serviceAccounts.actAs` permission for the specified service account. In addition, the AI Platform Training Google-managed service account must have the `roles/iam.serviceAccountAdmin` role for the specified service account. [Learn more about configuring a service account.](/ai-platform/training/docs/custom-service-account) If not specified, the AI Platform Training Google-managed service account is used by default.
    - `evaluatorType` string — Optional. Specifies the type of virtual machine to use for your training job's evaluator nodes. The supported values are the same as those described in the entry for `masterType`. This value must be consistent with the category of machine type that `masterType` uses. In other words, both must be Compute Engine machine types or both must be legacy machine types. This value must be present when `scaleTier` is set to `CUSTOM` and `evaluatorCount` is greater than zero.
    - `evaluatorConfig` GoogleCloudMlV1ReplicaConfig — Represents the configuration for a replica in a cluster.
      - `tpuTfVersion` string — The AI Platform runtime version that includes a TensorFlow version matching the one used in the custom container. This field is required if the replica is a TPU worker that uses a custom container. Otherwise, do not specify this field. This must be a [runtime version that currently supports training with TPUs](/ml-engine/docs/tensorflow/runtime-version-list#tpu-support). Note that the version of TensorFlow included in a runtime version may differ from the numbering of the runtime version itself, because it may have a different [patch version](https://www.tensorflow.org/guide/version_compat#semantic_versioning_20). In this field, you must specify the runtime version (TensorFlow minor version). For example, if your custom container runs TensorFlow `1.x.y`, specify `1.x`.
      - `acceleratorConfig` GoogleCloudMlV1AcceleratorConfig — Represents a hardware accelerator request config. Note that the AcceleratorConfig can be used in both Jobs and Versions. Learn more about [accelerators for training](/ml-engine/docs/using-gpus) and [accelerators for online prediction](/ml-engine/docs/machine-types-online-prediction#gpus).
        - `count` string, int64 — The number of accelerators to attach to each machine running the job.
        - `type` 'ACCELERATOR_TYPE_UNSPECIFIED' | 'NVIDIA_TESLA_K80' | 'NVIDIA_TESLA_P100' | 'NVIDIA_TESLA_V100' | 'NVIDIA_TESLA_P4' | 'NVIDIA_TESLA_T4' | 'NVIDIA_TESLA_A100' | 'TPU_V2' | 'TPU_V3' | 'TPU_V2_POD' | 'TPU_V3_POD' | 'TPU_V4_POD' — The type of accelerator to use.
      - `diskConfig` GoogleCloudMlV1DiskConfig — Represents the config of disk options.
        - `bootDiskSizeGb` integer — Size in GB of the boot disk (default is 100GB).
        - `bootDiskType` string — Type of the boot disk (default is "pd-ssd"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive).
      - `imageUri` string — The Docker image to run on the replica. This image must be in Container Registry. Learn more about [configuring custom containers](/ai-platform/training/docs/distributed-training-containers).
      - `containerArgs` string[] — Arguments to the entrypoint command. The following rules apply for container_command and container_args: - If you do not supply command or args: The defaults defined in the Docker image are used. - If you supply a command but no args: The default EntryPoint and the default Cmd defined in the Docker image are ignored. Your command is run without any arguments. - If you supply only args: The default Entrypoint defined in the Docker image is run with the args that you supplied. - If you supply a command and args: The default Entrypoint and the default Cmd defined in the Docker image are ignored. Your command is run with your args. It cannot be set if custom container image is not provided. Note that this field and [TrainingInput.args] are mutually exclusive, i.e., both cannot be set at the same time.
      - `containerCommand` string[] — The command with which the replica's custom container is run. If provided, it will override default ENTRYPOINT of the docker image. If not provided, the docker image's ENTRYPOINT is used. It cannot be set if custom container image is not provided. Note that this field and [TrainingInput.args] are mutually exclusive, i.e., both cannot be set at the same time.
    - `enableWebAccess` boolean — Optional. Whether you want AI Platform Training to enable [interactive shell access](https://cloud.google.com/ai-platform/training/docs/monitor-debug-interactive-shell) to training containers. If set to `true`, you can access interactive shells at the URIs given by TrainingOutput.web_access_uris or HyperparameterOutput.web_access_uris (within TrainingOutput.trials).
    - `parameterServerCount` string, int64 — Optional. The number of parameter server replicas to use for the training job. Each replica in the cluster will be of the type specified in `parameter_server_type`. This value can only be used when `scale_tier` is set to `CUSTOM`. If you set this value, you must also set `parameter_server_type`. The default value is zero.
    - `args` string[] — Optional. Command-line arguments passed to the training application when it starts. If your job uses a custom container, then the arguments are passed to the container's `ENTRYPOINT` command.
    - `parameterServerType` string — Optional. Specifies the type of virtual machine to use for your training job's parameter server. The supported values are the same as those described in the entry for `master_type`. This value must be consistent with the category of machine type that `masterType` uses. In other words, both must be Compute Engine machine types or both must be legacy machine types. This value must be present when `scaleTier` is set to `CUSTOM` and `parameter_server_count` is greater than zero.
    - `masterType` string — Optional. Specifies the type of virtual machine to use for your training job's master worker. You must specify this field when `scaleTier` is set to `CUSTOM`. You can use certain Compute Engine machine types directly in this field. See the [list of compatible Compute Engine machine types](/ai-platform/training/docs/machine-types#compute-engine-machine-types). Alternatively, you can use the certain legacy machine types in this field. See the [list of legacy machine types](/ai-platform/training/docs/machine-types#legacy-machine-types). Finally, if you want to use a TPU for training, specify `cloud_tpu` in this field. Learn more about the [special configuration options for training with TPUs](/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine).
    - `parameterServerConfig` GoogleCloudMlV1ReplicaConfig — Represents the configuration for a replica in a cluster.
      - `tpuTfVersion` string — The AI Platform runtime version that includes a TensorFlow version matching the one used in the custom container. This field is required if the replica is a TPU worker that uses a custom container. Otherwise, do not specify this field. This must be a [runtime version that currently supports training with TPUs](/ml-engine/docs/tensorflow/runtime-version-list#tpu-support). Note that the version of TensorFlow included in a runtime version may differ from the numbering of the runtime version itself, because it may have a different [patch version](https://www.tensorflow.org/guide/version_compat#semantic_versioning_20). In this field, you must specify the runtime version (TensorFlow minor version). For example, if your custom container runs TensorFlow `1.x.y`, specify `1.x`.
      - `acceleratorConfig` GoogleCloudMlV1AcceleratorConfig — Represents a hardware accelerator request config. Note that the AcceleratorConfig can be used in both Jobs and Versions. Learn more about [accelerators for training](/ml-engine/docs/using-gpus) and [accelerators for online prediction](/ml-engine/docs/machine-types-online-prediction#gpus).
        - `count` string, int64 — The number of accelerators to attach to each machine running the job.
        - `type` 'ACCELERATOR_TYPE_UNSPECIFIED' | 'NVIDIA_TESLA_K80' | 'NVIDIA_TESLA_P100' | 'NVIDIA_TESLA_V100' | 'NVIDIA_TESLA_P4' | 'NVIDIA_TESLA_T4' | 'NVIDIA_TESLA_A100' | 'TPU_V2' | 'TPU_V3' | 'TPU_V2_POD' | 'TPU_V3_POD' | 'TPU_V4_POD' — The type of accelerator to use.
      - `diskConfig` GoogleCloudMlV1DiskConfig — Represents the config of disk options.
        - `bootDiskSizeGb` integer — Size in GB of the boot disk (default is 100GB).
        - `bootDiskType` string — Type of the boot disk (default is "pd-ssd"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive).
      - `imageUri` string — The Docker image to run on the replica. This image must be in Container Registry. Learn more about [configuring custom containers](/ai-platform/training/docs/distributed-training-containers).
      - `containerArgs` string[] — Arguments to the entrypoint command. The following rules apply for container_command and container_args: - If you do not supply command or args: The defaults defined in the Docker image are used. - If you supply a command but no args: The default EntryPoint and the default Cmd defined in the Docker image are ignored. Your command is run without any arguments. - If you supply only args: The default Entrypoint defined in the Docker image is run with the args that you supplied. - If you supply a command and args: The default Entrypoint and the default Cmd defined in the Docker image are ignored. Your command is run with your args. It cannot be set if custom container image is not provided. Note that this field and [TrainingInput.args] are mutually exclusive, i.e., both cannot be set at the same time.
      - `containerCommand` string[] — The command with which the replica's custom container is run. If provided, it will override default ENTRYPOINT of the docker image. If not provided, the docker image's ENTRYPOINT is used. It cannot be set if custom container image is not provided. Note that this field and [TrainingInput.args] are mutually exclusive, i.e., both cannot be set at the same time.
    - `useChiefInTfConfig` boolean — Optional. Use `chief` instead of `master` in the `TF_CONFIG` environment variable when training with a custom container. Defaults to `false`. [Learn more about this field.](/ai-platform/training/docs/distributed-training-details#chief-versus-master) This field has no effect for training jobs that don't use a custom container.
    - `workerType` string — Optional. Specifies the type of virtual machine to use for your training job's worker nodes. The supported values are the same as those described in the entry for `masterType`. This value must be consistent with the category of machine type that `masterType` uses. In other words, both must be Compute Engine machine types or both must be legacy machine types. If you use `cloud_tpu` for this value, see special instructions for [configuring a custom TPU machine](/ml-engine/docs/tensorflow/using-tpus#configuring_a_custom_tpu_machine). This value must be present when `scaleTier` is set to `CUSTOM` and `workerCount` is greater than zero.
    - `pythonVersion` string — Optional. The version of Python used in training. You must either specify this field or specify `masterConfig.imageUri`. The following Python versions are available: * Python '3.7' is available when `runtime_version` is set to '1.15' or later. * Python '3.5' is available when `runtime_version` is set to a version from '1.4' to '1.14'. * Python '2.7' is available when `runtime_version` is set to '1.15' or earlier. Read more about the Python versions available for [each runtime version](/ml-engine/docs/runtime-version-list).
    - `jobDir` string — Optional. A Google Cloud Storage path in which to store training outputs and other data needed for training. This path is passed to your TensorFlow program as the '--job-dir' command-line argument. The benefit of specifying this field is that Cloud ML validates the path for use in training.
    - `pythonModule` string — Required. The Python module name to run after installing the packages.
    - `runtimeVersion` string — Optional. The AI Platform runtime version to use for training. You must either specify this field or specify `masterConfig.imageUri`. For more information, see the [runtime version list](/ai-platform/training/docs/runtime-version-list) and learn [how to manage runtime versions](/ai-platform/training/docs/versioning).
  - `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.
  - `endTime` string, google-datetime — Output only. When the job processing was completed.
  - `state` 'STATE_UNSPECIFIED' | 'QUEUED' | 'PREPARING' | 'RUNNING' | 'SUCCEEDED' | 'FAILED' | 'CANCELLING' | 'CANCELLED' — Output only. The detailed state of a job.
  - `etag` string, byte — `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.
  - `predictionOutput` GoogleCloudMlV1PredictionOutput — Represents results of a prediction job.
    - `predictionCount` string, int64 — The number of generated predictions.
    - `nodeHours` number, double — Node hours used by the batch prediction job.
    - `outputPath` string — The output Google Cloud Storage location provided at the job creation time.
    - `errorCount` string, int64 — The number of data instances which resulted in errors.
  - `trainingOutput` GoogleCloudMlV1TrainingOutput — Represents results of a training job. Output only.
    - `builtInAlgorithmOutput` GoogleCloudMlV1BuiltInAlgorithmOutput — Represents output related to a built-in algorithm Job.
      - `pythonVersion` string — Python version on which the built-in algorithm was trained.
      - `runtimeVersion` string — AI Platform runtime version on which the built-in algorithm was trained.
      - `framework` string — Framework on which the built-in algorithm was trained.
      - `modelPath` string — The Cloud Storage path to the `model/` directory where the training job saves the trained model. Only set for successful jobs that don't use hyperparameter tuning.
    - `trials` GoogleCloudMlV1HyperparameterOutput[] — Results for individual Hyperparameter trials. Only set for hyperparameter tuning jobs.
      - `builtInAlgorithmOutput` GoogleCloudMlV1BuiltInAlgorithmOutput — Represents output related to a built-in algorithm Job.
        - `pythonVersion` string — Python version on which the built-in algorithm was trained.
        - `runtimeVersion` string — AI Platform runtime version on which the built-in algorithm was trained.
        - `framework` string — Framework on which the built-in algorithm was trained.
        - `modelPath` string — The Cloud Storage path to the `model/` directory where the training job saves the trained model. Only set for successful jobs that don't use hyperparameter tuning.
      - `webAccessUris` object — URIs for accessing [interactive shells](https://cloud.google.com/ai-platform/training/docs/monitor-debug-interactive-shell) (one URI for each training node). Only available if this trial is part of a hyperparameter tuning job and the job's training_input.enable_web_access is `true`. The keys are names of each node in the training job; for example, `master-replica-0` for the master node, `worker-replica-0` for the first worker, and `ps-replica-0` for the first parameter server. The values are the URIs for each node's interactive shell.
      - `allMetrics` GoogleCloudMlV1HyperparameterOutputHyperparameterMetric[] — All recorded object metrics for this trial. This field is not currently populated.
        - `trainingStep` string, int64 — The global training step for this metric.
        - `objectiveValue` number, double — The objective value at this training step.
      - `endTime` string, google-datetime — Output only. End time for the trial.
      - `finalMetric` GoogleCloudMlV1HyperparameterOutputHyperparameterMetric — An observed value of a metric.
        - `trainingStep` string, int64 — The global training step for this metric.
        - `objectiveValue` number, double — The objective value at this training step.
      - `trialId` string — The trial id for these results.
      - `hyperparameters` object — The hyperparameters given to this trial.
      - `state` 'STATE_UNSPECIFIED' | 'QUEUED' | 'PREPARING' | 'RUNNING' | 'SUCCEEDED' | 'FAILED' | 'CANCELLING' | 'CANCELLED' — Output only. The detailed state of the trial.
      - `startTime` string, google-datetime — Output only. Start time for the trial.
      - `isTrialStoppedEarly` boolean — True if the trial is stopped early.
    - `completedTrialCount` string, int64 — The number of hyperparameter tuning trials that completed successfully. Only set for hyperparameter tuning jobs.
    - `webAccessUris` object — Output only. URIs for accessing [interactive shells](https://cloud.google.com/ai-platform/training/docs/monitor-debug-interactive-shell) (one URI for each training node). Only available if training_input.enable_web_access is `true`. The keys are names of each node in the training job; for example, `master-replica-0` for the master node, `worker-replica-0` for the first worker, and `ps-replica-0` for the first parameter server. The values are the URIs for each node's interactive shell.
    - `isBuiltInAlgorithmJob` boolean — Whether this job is a built-in Algorithm job.
    - `consumedMLUnits` number, double — The amount of ML units consumed by the job.
    - `isHyperparameterTuningJob` boolean — Whether this job is a hyperparameter tuning job.
    - `hyperparameterMetricTag` string — The TensorFlow summary tag name used for optimizing hyperparameter tuning trials. See [`HyperparameterSpec.hyperparameterMetricTag`](#HyperparameterSpec.FIELDS.hyperparameter_metric_tag) for more information. Only set for hyperparameter tuning jobs.
  - `errorMessage` string — Output only. The details of a failure or a cancellation.
  - `predictionInput` GoogleCloudMlV1PredictionInput — Represents input parameters for a prediction job.
    - `dataFormat` 'DATA_FORMAT_UNSPECIFIED' | 'JSON' | 'TEXT' | 'TF_RECORD' | 'TF_RECORD_GZIP' | 'CSV' — Required. The format of the input data files.
    - `region` string — Required. The Google Compute Engine region to run the prediction job in. See the available regions for AI Platform services.
    - `uri` string — Use this field if you want to specify a Google Cloud Storage path for the model to use.
    - `maxWorkerCount` string, int64 — Optional. The maximum number of workers to be used for parallel processing. Defaults to 10 if not specified.
    - `outputDataFormat` 'DATA_FORMAT_UNSPECIFIED' | 'JSON' | 'TEXT' | 'TF_RECORD' | 'TF_RECORD_GZIP' | 'CSV' — Optional. Format of the output data files, defaults to JSON.
    - `batchSize` string, int64 — 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.
    - `outputPath` string — Required. The output Google Cloud Storage location.
    - `inputPaths` string[] — Required. The Cloud Storage location of the input data files. May contain wildcards.
    - `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"`
    - `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 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.
    - `signatureName` string — Optional. The name of the signature defined in the SavedModel to use for this job. Please refer to [SavedModel](https://tensorflow.github.io/serving/serving_basic.html) for information about how to use signatures. Defaults to [DEFAULT_SERVING_SIGNATURE_DEF_KEY](https://www.tensorflow.org/api_docs/python/tf/saved_model/signature_constants) , which is "serving_default".
    - `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"`
  - `jobId` string — Required. The user-specified id of the job.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/ml.md) · [All operations](https://skmtc.net/google/apis/ml/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/ml/versions/2135f4d5ddf1/schema)
