class_docstr: An AI Platform Training based distributed CloudTuner.
  
  Attributes:
      oracle: Instance of Oracle class.
      hypermodel: Instance of HyperModel class
      directory: The Google Cloud Storage path for logs and checkpoints.
class_docstr_tok: ["An","AI","Platform","Training","based","distributed","CloudTuner",".","Attributes",":","oracle",":","Instance","of","Oracle","class",".","hypermodel",":","Instance","of","HyperModel","class","directory",":","The","Google","Cloud","Storage","path","for","logs","and","checkpoints","."]
docstr: Creates a request dictionary for the AI Platform training service.
  
  Args:
      job_id: Job name that will be used for AI Platform training
  Returns:
      An AI Platform Training job spec.
docstr_tok: ["Creates","a","request","dictionary","for","the","AI","Platform","training","service",".","Args",":","job_id",":","Job","name","that","will","be","used","for","AI","Platform","training","Returns",":","An","AI","Platform","Training","job","spec","."]
code: def _get_job_spec_from_config(self, job_id: Text) -> Dict[Text, Any]:
      """Creates a request dictionary for the AI Platform training service.
  
      Args:
          job_id: Job name that will be used for AI Platform training
      Returns:
          An AI Platform Training job spec.
      """
      # Set worker count as one less replica as one is dedicated as master
      worker_count = self._replica_count - 1
      worker_config = None
      if worker_count > 0:
          worker_config = self._replica_config
  
      # TODO(b/170224999) Refactor _validate_cluster_config to a public method
      validate._validate_cluster_config(  # pylint: disable= protected-access
          chief_config=self._replica_config,
          worker_count=worker_count,
          worker_config=worker_config,
          docker_parent_image=self._container_uri,
      )
  
      # TODO(b/170218538) Refactor _create_request_dict to a public method
      return deploy._create_request_dict(  # pylint: disable= protected-access
          job_id=job_id,
          region=self._region,
          image_uri=self._container_uri,
          chief_config=self._replica_config,
          worker_count=worker_count,
          worker_config=worker_config,
          entry_point_args=None,
          job_labels=None,
          service_account=None,
      )
  
imports: import collections
  import copy
  import datetime
  import os
  import time
  from typing import Any, Callable, Dict, List, Mapping, Optional, Text, Union
  from keras_tuner.engine import hypermodel
  from keras_tuner.engine import hyperparameters
  from keras_tuner.engine import metrics_tracking
  from keras_tuner.engine import oracle
  from keras_tuner.engine import trial
  from keras_tuner.engine import tuner
  import tensorflow
  from tensorboard.plugins.hparams import api
  from tensorflow_cloud.core import deploy
  from tensorflow_cloud.core import machine_config
  from tensorflow_cloud.core import validate
  from tensorflow_cloud.tuner import cloud_fit_client
  from tensorflow_cloud.tuner import utils
  from tensorflow_cloud.tuner import vizier_client
  from tensorflow_cloud.utils import google_api_client
  from tensorflow_cloud.utils import tf_utils
label_desc: Use image node_id 3 for calling the DistributingCloudTuner obj's underlying member method code with example usage: obj._get_job_spec_from_config(job_id) and returns: deploy