Module: tfma.model_util

Utils for working with models.

Classes

class BatchReducibleBatchedDoFnWithModels: Abstract class for DoFns that need the shared models.

class BatchReducibleDoFnWithModels: Abstract class for DoFns that need the shared models.

class CombineFnWithModels: Abstract class for CombineFns that need the shared models.

class DoFnWithModels: Abstract class for DoFns that need the shared models.

class ModelContents: Class for storing model contents.

Functions

filter_tensors_by_input_names(...): Filter tensors by input names.

find_input_name_in_features(...): Maps input name to an entry in features. Returns None if not found.

get_baseline_model_spec(...): Returns baseline model spec.

get_label_key(...): Returns the label_key corresponding to a given output name.

get_model_spec(...): Returns model spec with given model name.

get_model_type(...): Returns model type for given model spec taking into account defaults.

model_construct_fn(...): Returns function for constructing shared models.

rebatch_by_input_names(...): Converts a batch of extracts into multiple batches keyed by input names.

verify_and_update_eval_shared_models(...): Verifies eval shared models and normnalizes to produce a single list.

Other Members

  • KERAS_INPUT_SUFFIX = '_input'