def default_extractors(eval_shared_model: Union[(types.EvalSharedModel, Dict[(Text, types.EvalSharedModel)])]=None, eval_config: config.EvalConfig=None, slice_spec: Optional[List[slicer.SingleSliceSpec]]=None, desired_batch_size: Optional[int]=None, materialize: Optional[bool]=True) -> List[extractor.Extractor]:
    'Returns the default extractors for use in ExtractAndEvaluate.\n\n  Args:\n    eval_shared_model: Shared model (single-model evaluation) or dict of shared\n      models keyed by model name (multi-model evaluation). Required unless the\n      predictions are provided alongside of the features (i.e. model-agnostic\n      evaluations).\n    eval_config: Eval config.\n    slice_spec: Deprecated (use EvalConfig).\n    desired_batch_size: Optional batch size for batching in Predict.\n    materialize: True to have extractors create materialized output.\n\n  Raises:\n    NotImplementedError: If eval_config contains mixed serving and eval models.\n  '
    if (eval_config is not None):
        eval_config = config.update_eval_config_with_defaults(eval_config)
        slice_spec = [slicer.SingleSliceSpec(spec=spec) for spec in eval_config.slicing_specs]
    if _is_legacy_eval(eval_shared_model, eval_config):
        return [predict_extractor.PredictExtractor(eval_shared_model, desired_batch_size, materialize=materialize), slice_key_extractor.SliceKeyExtractor(slice_spec, materialize=materialize)]
    elif eval_shared_model:
        model_types = model_util.get_model_types(eval_config)
        if (not model_types.issubset(constants.VALID_MODEL_TYPES)):
            raise NotImplementedError('model type must be one of: {}. evalconfig={}'.format(str(constants.VALID_MODEL_TYPES), eval_config))
        if (model_types == set([constants.TF_LITE])):
            return [input_extractor.InputExtractor(eval_config=eval_config), tflite_predict_extractor.TFLitePredictExtractor(eval_config=eval_config, eval_shared_model=eval_shared_model, desired_batch_size=desired_batch_size), slice_key_extractor.SliceKeyExtractor(slice_spec, materialize=materialize)]
        elif (constants.TF_LITE in model_types):
            raise NotImplementedError('support for mixing tf_lite and non-tf_lite models is not implemented: eval_config={}'.format(eval_config))
        elif (eval_config and all(((s.signature_name == eval_constants.EVAL_TAG) for s in eval_config.model_specs))):
            return [predict_extractor.PredictExtractor(eval_shared_model, desired_batch_size, materialize=materialize, eval_config=eval_config), slice_key_extractor.SliceKeyExtractor(slice_spec, materialize=materialize)]
        elif (eval_config and any(((s.signature_name == eval_constants.EVAL_TAG) for s in eval_config.model_specs))):
            raise NotImplementedError('support for mixing eval and non-eval models is not implemented: eval_config={}'.format(eval_config))
        else:
            return [input_extractor.InputExtractor(eval_config=eval_config), predict_extractor_v2.PredictExtractor(eval_config=eval_config, eval_shared_model=eval_shared_model, desired_batch_size=desired_batch_size), slice_key_extractor.SliceKeyExtractor(slice_spec, materialize=materialize)]
    else:
        return [input_extractor.InputExtractor(eval_config=eval_config), slice_key_extractor.SliceKeyExtractor(slice_spec, materialize=materialize)]
Returns the default extractors for use in ExtractAndEvaluate.

Args:
  eval_shared_model: Shared model (single-model evaluation) or dict of shared
    models keyed by model name (multi-model evaluation). Required unless the
    predictions are provided alongside of the features (i.e. model-agnostic
    evaluations).
  eval_config: Eval config.
  slice_spec: Deprecated (use EvalConfig).
  desired_batch_size: Optional batch size for batching in Predict.
  materialize: True to have extractors create materialized output.

Raises:
  NotImplementedError: If eval_config contains mixed serving and eval models.
def default_extractors(eval_shared_model: Union[(types.EvalSharedModel, Dict[(Text, types.EvalSharedModel)])]=None, eval_config: config.EvalConfig=None, slice_spec: Optional[List[slicer.SingleSliceSpec]]=None, desired_batch_size: Optional[int]=None, materialize: Optional[bool]=True) -> List[extractor.Extractor]:
    'Returns the default extractors for use in ExtractAndEvaluate.\n\n  Args:\n    eval_shared_model: Shared model (single-model evaluation) or dict of shared\n      models keyed by model name (multi-model evaluation). Required unless the\n      predictions are provided alongside of the features (i.e. model-agnostic\n      evaluations).\n    eval_config: Eval config.\n    slice_spec: Deprecated (use EvalConfig).\n    desired_batch_size: Optional batch size for batching in Predict.\n    materialize: True to have extractors create materialized output.\n\n  Raises:\n    NotImplementedError: If eval_config contains mixed serving and eval models.\n  '
    if (eval_config is not None):
        eval_config = config.update_eval_config_with_defaults(eval_config)
        slice_spec = [slicer.SingleSliceSpec(spec=spec) for spec in eval_config.slicing_specs]
    if _is_legacy_eval(eval_shared_model, eval_config):
        return [predict_extractor.PredictExtractor(eval_shared_model, desired_batch_size, materialize=materialize), slice_key_extractor.SliceKeyExtractor(slice_spec, materialize=materialize)]
    elif eval_shared_model:
        model_types = model_util.get_model_types(eval_config)
        if (not model_types.issubset(constants.VALID_MODEL_TYPES)):
            raise NotImplementedError('model type must be one of: {}. evalconfig={}'.format(str(constants.VALID_MODEL_TYPES), eval_config))
        if (model_types == set([constants.TF_LITE])):
            return [input_extractor.InputExtractor(eval_config=eval_config), tflite_predict_extractor.TFLitePredictExtractor(eval_config=eval_config, eval_shared_model=eval_shared_model, desired_batch_size=desired_batch_size), slice_key_extractor.SliceKeyExtractor(slice_spec, materialize=materialize)]
        elif (constants.TF_LITE in model_types):
            raise NotImplementedError('support for mixing tf_lite and non-tf_lite models is not implemented: eval_config={}'.format(eval_config))
        elif (eval_config and all(((s.signature_name == eval_constants.EVAL_TAG) for s in eval_config.model_specs))):
            return [predict_extractor.PredictExtractor(eval_shared_model, desired_batch_size, materialize=materialize, eval_config=eval_config), slice_key_extractor.SliceKeyExtractor(slice_spec, materialize=materialize)]
        elif (eval_config and any(((s.signature_name == eval_constants.EVAL_TAG) for s in eval_config.model_specs))):
            raise NotImplementedError('support for mixing eval and non-eval models is not implemented: eval_config={}'.format(eval_config))
        else:
            return [input_extractor.InputExtractor(eval_config=eval_config), predict_extractor_v2.PredictExtractor(eval_config=eval_config, eval_shared_model=eval_shared_model, desired_batch_size=desired_batch_size), slice_key_extractor.SliceKeyExtractor(slice_spec, materialize=materialize)]
    else:
        return [input_extractor.InputExtractor(eval_config=eval_config), slice_key_extractor.SliceKeyExtractor(slice_spec, materialize=materialize)]