class_docstr: Generates candidates towers for Phoenix via search algorithms.
class_docstr_tok: ["Generates","candidates","towers","for","Phoenix","via","search","algorithms","."]
docstr: Initialize the object.
docstr_tok: ["Initialize","the","object","."]
code: def __init__(self, phoenix_spec, metadata):
      """Initialize the object."""
      super(SearchCandidateGenerator, self).__init__(
          phoenix_spec=phoenix_spec, metadata=metadata
      )
      self._phoenix_spec = phoenix_spec
      self._max_depth = phoenix_spec.maximum_depth
      search_algorithms = {
          phoenix_spec_pb2.PhoenixSpec.NONADAPTIVE_RANDOM_SEARCH: search.identity.Identity(
              phoenix_spec=phoenix_spec
          ),
          phoenix_spec_pb2.PhoenixSpec.ADAPTIVE_COORDINATE_DESCENT: search.coordinate_descent.CoordinateDescent(
              phoenix_spec=phoenix_spec, metadata=self._metadata
          ),
          phoenix_spec_pb2.PhoenixSpec.CONSTRAINED_ADAPTIVE_COORDINATE_DESCENT: search.constrained_descent.ConstrainedDescent(
              phoenix_spec=phoenix_spec, metadata=self._metadata
          ),
          phoenix_spec_pb2.PhoenixSpec.HARMONICA_SEARCH: search.categorical_harmonica.Harmonica(
              phoenix_spec=phoenix_spec
          ),
          phoenix_spec_pb2.PhoenixSpec.LINEAR_MODEL: search.linear_model.LinearModel(
              phoenix_spec=phoenix_spec
          ),
      }
      self._search_algorithm = search_algorithms[
          phoenix_spec.search_type
      ]
      self._ensemble_spec = phoenix_spec.ensemble_spec
  
      # Overridden from parent.
      self._allow_auxiliary_head = True
  
imports: import functools
  from absl import logging
  from model_search import block_builder
  from model_search import search
  from model_search.architecture import architecture_utils
  from model_search.architecture import tower
  from model_search.generators import base_tower_generator
  from model_search.generators import trial_utils
  from model_search.proto import phoenix_spec_pb2
  from model_search.proto import transfer_learning_spec_pb2
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 1 to create a new SearchCandidateGenerator object from inherited base classes: base_tower_generator with example: obj = SearchCandidateGenerator(phoenix_spec, metadata)