def _dtype_from_json(domain):
  """Translate a JSON domain dict into a tf.DType."""
  if domain.get('ints') is not None:
    return tf.int64
  if domain.get('floats') is not None:
    return tf.float32
  if domain.get('strings') is not None:
    return tf.string
  raise ValueError('Unknown domain: {}'.format(domain))
Translate a JSON domain dict into a tf.DType.
tensorflow_transform/tf_metadata/metadata_io.py