docstr: Test case to configure Tuner with tf.data.Dataset as input data.
docstr_tok: ["Test","case","to","configure","Tuner","with","tf.data.Dataset","as","input","data","."]
code: def testCloudTunerDatasets(self):
      """Test case to configure Tuner with tf.data.Dataset as input data."""
      train_dataset = (
          tf.data.Dataset.from_tensor_slices((self._x, self._y))
          .batch(128)
          .cache()
          .prefetch(1000)
      )
      eval_dataset = (
          tf.data.Dataset.from_tensor_slices((self._val_x, self._val_y))
          .batch(128)
          .cache()
          .prefetch(1000)
      )
  
      study_id = "{}_dataset".format(_STUDY_ID_BASE)
      self._study_id = study_id
  
      tuner = CloudTuner(
          _build_model,
          project_id=_PROJECT_ID,
          region=_REGION,
          objective="acc",
          hyperparameters=_HPS,
          study_id=study_id,
          max_trials=5,
          directory=os.path.join(self.get_temp_dir(), study_id),
      )
  
      self._assert_output(
          tuner.search_space_summary,
          r".*Search space summary(?=.*learning_rate \(Float\))"
          r"(?=.*num_layers \(Int\).*)",
      )
  
      tuner.search(
          x=train_dataset,
          epochs=2,
          steps_per_epoch=20,
          validation_steps=10,
          validation_data=eval_dataset,
      )
  
      self._assert_results_summary(tuner.results_summary)
  
imports: import contextlib
  import io
  import multiprocessing
  import os
  import re
  import time
  import keras_tuner
  import tensorflow
  from tensorflow import keras
  from tensorflow_cloud import CloudTuner
  from tensorflow_cloud.tuner import vizier_client
label_desc: Use image node_id 3 for calling the CloudTunerIntegrationTest obj's underlying member method code with example usage: obj.testCloudTunerDatasets() without return types