TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tfx.components.util.value_utils.GetSoleValue

View source on GitHub

Helper method for retrieving a sole labeled input.

tfx.components.util.value_utils.GetSoleValue(
    inputs,
    label,
    strict=True
)

Args:

  • inputs: Dict from label to a value list.
  • label: Label of the value to retrieve.
  • strict: If true, exact one value should exist for label.

Returns:

A sole labeled value.

Raises:

  • ValueError: If there is no/multiple input associated with the label.