MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _get_kwarg_as_str_attr

Function _get_kwarg_as_str_attr

tensorflow/python/framework/function.py:1190–1196  ·  view source on GitHub ↗

Creates an AttrValue for a python object.

(attr_name, value)

Source from the content-addressed store, hash-verified

1188
1189
1190def _get_kwarg_as_str_attr(attr_name, value):
1191 """Creates an AttrValue for a python object."""
1192 if isinstance(value, str):
1193 return attr_value_pb2.AttrValue(s=compat.as_bytes(value))
1194 else:
1195 raise ValueError("Unsupported attribute type for %s with type %s" %
1196 (attr_name, type(value)))
1197
1198
1199def _parse_kwargs_as_attrs(func_name, **kwargs):

Callers 1

_parse_kwargs_as_attrsFunction · 0.85

Calls 1

typeFunction · 0.85

Tested by

no test coverage detected