class_docstr: KerasTuner interface implementation backed by Vizier Service.
  
  CloudTuner is a implementation of KerasTuner that uses Google Cloud Vizier
  Service as its Oracle. To learn more about KerasTuner and Oracles please
  refer to:
  
  *  https://keras-team.github.io/keras-tuner/
  *  https://keras-team.github.io/keras-tuner/documentation/oracles/
  
  Example:
  
  ```
  tuner = CloudTuner(
      build_model,
      project_id="MY_PROJECT_ID",
      region='us-central1',
      objective='accuracy',
      hyperparameters=HPS,
      max_trials=5,
      directory='tmp/MY_JOB')
  ```
class_docstr_tok: ["KerasTuner","interface","implementation","backed","by","Vizier","Service",".","CloudTuner","is","a","implementation","of","KerasTuner","that","uses","Google","Cloud","Vizier","Service","as","its","Oracle",".","To","learn","more","about","KerasTuner","and","Oracles","please","refer","to",":","*","https",":","\/\/keras-team.github.io\/keras-tuner\/","*","https",":","\/\/keras-team.github.io\/keras-tuner\/documentation\/oracles\/","Example",":","``","`","tuner","=","CloudTuner","(","build_model",",","project_id=","''","MY_PROJECT_ID","''",",","region='us-central1","'",",","objective='accuracy","'",",","hyperparameters=HPS",",","max_trials=5",",","directory='tmp\/MY_JOB","'",")","``","`"]
docstr: Constructor.
  
  Args:
      hypermodel: Instance of HyperModel class (or callable that takes
          hyperparameters and returns a Model instance).
      project_id: A GCP project id.
      region: A GCP region. e.g. 'us-central1'.
      objective: Name of model metric to minimize or maximize, e.g.
          "val_accuracy".
      hyperparameters: Can be used to override (or register in advance)
          hyperparameters in the search space.
      study_config: Study configuration for Vizier service.
      max_trials: Total number of trials (model configurations) to test at
          most. Note that the oracle may interrupt the search before
          `max_trials` models have been tested if the search space has
          been exhausted.
      study_id: An identifier of the study. The full study name will be
          projects/{project_id}/locations/{region}/studies/{study_id}.
      **kwargs: Keyword arguments relevant to all `Tuner` subclasses.
          Please see the docstring for `Tuner`.
docstr_tok: ["Constructor",".","Args",":","hypermodel",":","Instance","of","HyperModel","class","(","or","callable","that","takes","hyperparameters","and","returns","a","Model","instance",")",".","project_id",":","A","GCP","project","id",".","region",":","A","GCP","region",".","e.g",".","'us-central1","'",".","objective",":","Name","of","model","metric","to","minimize","or","maximize",",","e.g",".","``","val_accuracy","''",".","hyperparameters",":","Can","be","used","to","override","(","or","register","in","advance",")","hyperparameters","in","the","search","space",".","study_config",":","Study","configuration","for","Vizier","service",".","max_trials",":","Total","number","of","trials","(","model","configurations",")","to","test","at","most",".","Note","that","the","oracle","may","interrupt","the","search","before","`","max_trials","`","models","have","been","tested","if","the","search","space","has","been","exhausted",".","study_id",":","An","identifier","of","the","study",".","The","full","study","name","will","be","projects\/","{","project_id","}","\/locations\/","{","region","}","\/studies\/","{","study_id","}",".","*","*","kwargs",":","Keyword","arguments","relevant","to","all","`","Tuner","`","subclasses",".","Please","see","the","docstring","for","`","Tuner","`","."]
code: def __init__(
      self,
      hypermodel: Union[
          hypermodel_module.HyperModel,
          Callable[[hp_module.HyperParameters], tf.keras.Model],
      ],
      project_id: Text,
      region: Text,
      objective: Optional[Union[Text, oracle_module.Objective]] = None,
      hyperparameters: Optional[hp_module.HyperParameters] = None,
      study_config: Optional[Dict[Text, Any]] = None,
      max_trials: Optional[int] = None,
      study_id: Optional[Text] = None,
      **kwargs,
  ):
      """Constructor.
  
      Args:
          hypermodel: Instance of HyperModel class (or callable that takes
              hyperparameters and returns a Model instance).
          project_id: A GCP project id.
          region: A GCP region. e.g. 'us-central1'.
          objective: Name of model metric to minimize or maximize, e.g.
              "val_accuracy".
          hyperparameters: Can be used to override (or register in advance)
              hyperparameters in the search space.
          study_config: Study configuration for Vizier service.
          max_trials: Total number of trials (model configurations) to test at
              most. Note that the oracle may interrupt the search before
              `max_trials` models have been tested if the search space has
              been exhausted.
          study_id: An identifier of the study. The full study name will be
              projects/{project_id}/locations/{region}/studies/{study_id}.
          **kwargs: Keyword arguments relevant to all `Tuner` subclasses.
              Please see the docstring for `Tuner`.
      """
      oracle = CloudOracle(
          project_id=project_id,
          region=region,
          objective=objective,
          hyperparameters=hyperparameters,
          study_config=study_config,
          max_trials=max_trials,
          study_id=study_id,
      )
      super(
          CloudTuner,
          self,
      ).__init__(oracle=oracle, hypermodel=hypermodel, **kwargs)
  
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 1 to create a new CloudTuner object from inherited base classes: tuner_module with example: obj = CloudTuner(hypermodel, project_id, region, objective, hyperparameters, study_config, max_trials, study_id)