class_docstr: An :class:`adanet.Estimator` capable of training and evaluating on TPU.
  
  Unless :code:`use_tpu=False`, training will run on TPU. However, certain parts
  of the AdaNet training loop, such as report materialization and best candidate
  selection, will still occurr on CPU. Furthermore, if using TPUEmbedding (i.e.
  :code:`embedding_config_spec` is supplied), inference will also occurr on CPU.
  
  TODO: Provide the missing functionality detailed below.
  N.B: Embeddings using the TPUEmbedding (i.e. :code:`embedding_config_spec`
  is provided) only support :code:`shared_embedding_columns` when running for
  multiple AdaNet iterations. Using regular :code:`embedding_columns` will cause
  iterations 2..n to fail because of mismatched embedding scopes.
  
  Args:
    head: See :class:`adanet.Estimator`.
    subnetwork_generator: See :class:`adanet.Estimator`.
    max_iteration_steps: See :class:`adanet.Estimator`.
    ensemblers: See :class:`adanet.Estimator`.
    ensemble_strategies: See :class:`adanet.Estimator`.
    evaluator: See :class:`adanet.Estimator`.
    report_materializer: See :class:`adanet.Estimator`.
    metric_fn: See :class:`adanet.Estimator`.
    force_grow: See :class:`adanet.Estimator`.
    replicate_ensemble_in_training: See :class:`adanet.Estimator`.
    adanet_loss_decay: See :class:`adanet.Estimator`.
    report_dir: See :class:`adanet.Estimator`.
    config: See :class:`adanet.Estimator`.
    use_tpu: Boolean to enable training on TPU. Defaults to :code:`True` and is
      only provided to allow debugging models on CPU/GPU. Use
      :class:`adanet.Estimator` instead if you do not plan to run on TPU.
    eval_on_tpu: Boolean to enable evaluating on TPU. Defaults to :code:`True`.
      Ignored if :code:`use_tpu=False`.
    export_to_tpu: See :class:`tf.compat.v1.estimator.tpu.TPUEstimator`.
    train_batch_size: See :class:`tf.compat.v1.estimator.tpu.TPUEstimator`.
      Defaults to 0 if `None`.
    eval_batch_size: See :class:`tf.compat.v1.estimator.tpu.TPUEstimator`.
      Defaults to train_batch_size if `None`.
    predict_batch_size: See :class:`tf.compat.v1.estimator.tpu.TPUEstimator`.
      Defaults to eval_batch_size if `None`.
    embedding_config_spec: See :class:`tf.compat.v1.estimator.tpu.TPUEstimator`.
      If supplied, :code:`predict` will be called on CPU and no TPU compatible
        :code:`SavedModel` will be exported.
    debug: See :class:`adanet.Estimator`.
    enable_ensemble_summaries: See :class:`adanet.Estimator`.
    enable_subnetwork_summaries: See :class:`adanet.Estimator`.
    export_subnetwork_logits: Whether to include subnetwork logits in exports.
    export_subnetwork_last_layer: Whether to include subnetwork last layer in
      exports.
    global_step_combiner_fn: See :class:`adanet.Estimator`.
    max_iterations: See :class:`adanet.Estimator`.
    replay_config: See :class:`adanet.Estimator`.
    add_predict_batch_config: If True, supplies a default
      `tpu_estimator.BatchConfig` when calling
      `tpu_estimator.model_fn_inference_on_tpu`, otherwise supplies None.
    **kwargs: Extra keyword args passed to the parent.
docstr: See the `Estimator` base class for details.
docstr_tok: ["See","the","`","Estimator","`","base","class","for","details","."]
code: def _training_hooks(
      self,
      current_iteration,
      training,
      iteration_number_tensor,
      previous_iteration_vars,
      is_growing_phase,
  ):
      """See the `Estimator` base class for details."""
  
      training_hooks = super(TPUEstimator, self)._training_hooks(
          current_iteration,
          training,
          iteration_number_tensor,
          previous_iteration_vars,
          is_growing_phase,
      )
      if self._use_tpu:
          # Remove summary hooks on TPU since summaries are saved via host_call.
          training_hooks = [
              hook
              for hook in training_hooks
              if not isinstance(
                  hook, tf.compat.v1.train.SummarySaverHook
              )
          ]
  
      return training_hooks
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import contextlib
  import functools
  from absl import logging
  from adanet import tf_compat
  from adanet.core.estimator import Estimator
  import tensorflow.compat.v2
label_desc: Use image node_id 7 for calling the TPUEstimator obj's underlying member method code with example usage: obj._training_hooks(current_iteration, training, iteration_number_tensor, previous_iteration_vars, is_growing_phase) and returns: training_hooks