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

Method to_string

tensorflow/python/framework/device_spec.py:114–121  ·  view source on GitHub ↗

Return a string representation of this `DeviceSpec`. Returns: a string of the form /job: /replica: /task: /device: : .

(self)

Source from the content-addressed store, hash-verified

112 self._hash = hash(self.to_string())
113
114 def to_string(self):
115 """Return a string representation of this `DeviceSpec`.
116
117 Returns:
118 a string of the form
119 /job:<name>/replica:<id>/task:<id>/device:<device_type>:<id>.
120 """
121 return self._as_string
122
123 @classmethod
124 def from_string(cls, spec):

Callers 15

__init__Method · 0.95
__eq__Method · 0.95
__call__Method · 0.45
ConnectionMethod · 0.45
_set_deviceMethod · 0.45
test_emptyMethod · 0.45
test_constructorMethod · 0.45
testto_stringMethod · 0.45
test_to_from_stringMethod · 0.45
test_combineMethod · 0.45
testMergeMethod · 0.45
_device_stringFunction · 0.45

Calls

no outgoing calls

Tested by 9

test_emptyMethod · 0.36
test_constructorMethod · 0.36
testto_stringMethod · 0.36
test_to_from_stringMethod · 0.36
test_combineMethod · 0.36
testMergeMethod · 0.36
testContextMethod · 0.36