docstr: Creates a phoenix.Phoenix instance with mostly default parameters.
  
  Args:
    problem_type: The problem type (e.g. cnn, rnn, etc) for which to create a
      PhoenixSpec.
    input_shape: The shape of the input Tensor (including batch size).
    head: The head to pass to the Phoenix instance.
    logits_dimension: The shape of the logits to pass to the Phoenix instance.
    label_vocabulary: The label_vocabulary to pass to the Phoenix instance.
    loss_fn: The loss_fn to pass to the Phoenix instance.
    metric_fn: The metric_fn to pass to the Phoenix instance.
  
  Returns:
    A newly created phoenix.Phoenix instance.
docstr_tok: ["Creates","a","phoenix.Phoenix","instance","with","mostly","default","parameters",".","Args",":","problem_type",":","The","problem","type","(","e.g",".","cnn",",","rnn",",","etc",")","for","which","to","create","a","PhoenixSpec",".","input_shape",":","The","shape","of","the","input","Tensor","(","including","batch","size",")",".","head",":","The","head","to","pass","to","the","Phoenix","instance",".","logits_dimension",":","The","shape","of","the","logits","to","pass","to","the","Phoenix","instance",".","label_vocabulary",":","The","label_vocabulary","to","pass","to","the","Phoenix","instance",".","loss_fn",":","The","loss_fn","to","pass","to","the","Phoenix","instance",".","metric_fn",":","The","metric_fn","to","pass","to","the","Phoenix","instance",".","Returns",":","A","newly","created","phoenix.Phoenix","instance","."]
code: def _create_phoenix_instance(
      self,
      problem_type,
      input_shape=None,
      head=None,
      logits_dimension=None,
      label_vocabulary=None,
      loss_fn=None,
      metric_fn=None,
  ):
      """Creates a phoenix.Phoenix instance with mostly default parameters.
  
      Args:
        problem_type: The problem type (e.g. cnn, rnn, etc) for which to create a
          PhoenixSpec.
        input_shape: The shape of the input Tensor (including batch size).
        head: The head to pass to the Phoenix instance.
        logits_dimension: The shape of the logits to pass to the Phoenix instance.
        label_vocabulary: The label_vocabulary to pass to the Phoenix instance.
        loss_fn: The loss_fn to pass to the Phoenix instance.
        metric_fn: The metric_fn to pass to the Phoenix instance.
  
      Returns:
        A newly created phoenix.Phoenix instance.
      """
      spec = self._create_phoenix_spec(problem_type)
      input_shape = input_shape or [8, 32, 32, 3]
      logits_dimension = (
          10 if not logits_dimension and not head else logits_dimension
      )
  
      def _input_layer_fn(
          features, is_training, scope_name, lengths_feature_name
      ):
          del is_training
          del scope_name
          input_layer = tf.cast(features["zeros"], dtype=tf.float32)
          if (
              spec.problem_type
              == phoenix_spec_pb2.PhoenixSpec.RNN_ALL_ACTIVATIONS
              or spec.problem_type
              == phoenix_spec_pb2.PhoenixSpec.RNN_LAST_ACTIVATIONS
          ):
              lengths = features[lengths_feature_name]
          else:
              lengths = None
  
          return input_layer, lengths
  
      return phoenix.Phoenix(
          phoenix_spec=spec,
          input_layer_fn=_input_layer_fn,
          study_owner="test_owner",
          study_name="test_name",
          head=head,
          logits_dimension=logits_dimension,
          label_vocabulary=label_vocabulary,
          loss_fn=loss_fn,
          metric_fn=metric_fn,
          metadata=mock_metadata.MockMetaData(),
      )
  
imports: import os
  from absl import flags
  from absl.testing import parameterized
  from model_search import hparam
  from model_search import loss_fns
  from model_search import phoenix
  from model_search.architecture import architecture_utils
  from model_search.metadata import mock_metadata
  from model_search.proto import phoenix_spec_pb2
  import numpy
  import tensorflow.compat.v2
  from google.protobuf import text_format
label_desc: Use image node_id 2 for calling the PhoenixTest obj's underlying member method code with example usage: obj._create_phoenix_instance(problem_type, input_shape, head, logits_dimension, label_vocabulary, loss_fn, metric_fn) and returns: phoenix, input_layer,  lengths