parameters: (input_alternatives, output_alternatives,
                               actual_default_output_alternative_key)
return_statement: return signature_def_map
docstring: Build `SignatureDef`s from all pairs of input and output alternatives.
docstring_summary: Build `SignatureDef`s from all pairs of input and output alternatives.
docstring_tokens: Build SignatureDef s from all pairs of input and output alternatives .
function: def build_all_signature_defs(input_alternatives, output_alternatives,
                               actual_default_output_alternative_key):
    """Build `SignatureDef`s from all pairs of input and output alternatives."""
  
    signature_def_map = {('%s:%s' % (input_key, output_key or 'None')):
                         build_standardized_signature_def(inputs, outputs,
                                                          problem_type)
                         for input_key, inputs in input_alternatives.items()
                         for output_key, (problem_type,
                                          outputs) in output_alternatives.items()}
  
    # Add the default SignatureDef
    default_inputs = input_alternatives.get(DEFAULT_INPUT_ALTERNATIVE_KEY)
    if not default_inputs:
      raise ValueError('A default input_alternative must be provided.')
      # default_inputs = input_alternatives[FEATURES_INPUT_ALTERNATIVE_KEY]
    # default outputs are guaranteed to exist above
    (default_problem_type, default_outputs) = (
        output_alternatives[actual_default_output_alternative_key])
    signature_def_map[signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY] = (
        build_standardized_signature_def(default_inputs, default_outputs,
                                         default_problem_type))
  
    return signature_def_map
function_tokens: def build_all_signature_defs ( input_alternatives , output_alternatives , actual_default_output_alternative_key ) : signature_def_map = { ( '%s:%s' % ( input_key , output_key or 'None' ) ) : build_standardized_signature_def ( inputs , outputs , problem_type ) for input_key , inputs in input_alternatives . items ( ) for output_key , ( problem_type , outputs ) in output_alternatives . items ( ) } # Add the default SignatureDef default_inputs = input_alternatives . get ( DEFAULT_INPUT_ALTERNATIVE_KEY ) if not default_inputs : raise ValueError ( 'A default input_alternative must be provided.' ) # default_inputs = input_alternatives[FEATURES_INPUT_ALTERNATIVE_KEY] # default outputs are guaranteed to exist above ( default_problem_type , default_outputs ) = ( output_alternatives [ actual_default_output_alternative_key ] ) signature_def_map [ signature_constants . DEFAULT_SERVING_SIGNATURE_DEF_KEY ] = ( build_standardized_signature_def ( default_inputs , default_outputs , default_problem_type ) ) return signature_def_map