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

Class StringGaugeCell

tensorflow/python/eager/monitoring.py:238–262  ·  view source on GitHub ↗

A single string value stored in an `StringGauge`.

Source from the content-addressed store, hash-verified

236
237
238class StringGaugeCell(object):
239 """A single string value stored in an `StringGauge`."""
240
241 def __init__(self, cell):
242 """Creates a new StringGaugeCell.
243
244 Args:
245 cell: A c pointer of TFE_MonitoringStringGaugeCell.
246 """
247 self._cell = cell
248
249 def set(self, value):
250 """Atomically set the value.
251
252 Args:
253 value: string value.
254 """
255 pywrap_tensorflow.TFE_MonitoringStringGaugeCellSet(self._cell, value)
256
257 def value(self):
258 """Retrieves the current value."""
259 with c_api_util.tf_buffer() as buffer_:
260 pywrap_tensorflow.TFE_MonitoringStringGaugeCellValue(self._cell, buffer_)
261 value = pywrap_tensorflow.TF_GetBuffer(buffer_).decode('utf-8')
262 return value
263
264
265class StringGauge(Metric):

Callers 1

get_cellMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected