Return a string representation of this `DeviceSpec`. Returns: a string of the form /job: /replica: /task: /device: : .
(self)
| 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): |
no outgoing calls