Export BoolGauge as a tf.__internal__ API.

PiperOrigin-RevId: 355489532
Change-Id: Ic3e30438dc8bd3142e87ceab5471700115b3010e
This commit is contained in:
Yanhui Liang 2021-02-03 14:58:14 -08:00 committed by TensorFlower Gardener
parent 6ff048e951
commit f945c5aeb3
5 changed files with 28 additions and 0 deletions

View File

@ -27,6 +27,7 @@ from tensorflow.python import pywrap_tfe
from tensorflow.python.client import pywrap_tf_session from tensorflow.python.client import pywrap_tf_session
from tensorflow.python.framework import c_api_util from tensorflow.python.framework import c_api_util
from tensorflow.python.util import compat from tensorflow.python.util import compat
from tensorflow.python.util.tf_export import tf_export
_MetricMethod = collections.namedtuple('MetricMethod', 'create delete get_cell') _MetricMethod = collections.namedtuple('MetricMethod', 'create delete get_cell')
_counter_methods = [ _counter_methods = [
@ -329,6 +330,7 @@ class BoolGaugeCell(object):
return pywrap_tfe.TFE_MonitoringBoolGaugeCellValue(self._cell) return pywrap_tfe.TFE_MonitoringBoolGaugeCellValue(self._cell)
@tf_export("__internal__.monitoring.BoolGauge", v1=[])
class BoolGauge(Metric): class BoolGauge(Metric):
"""A stateful class for updating a gauge-like bool metric. """A stateful class for updating a gauge-like bool metric.

View File

@ -12,6 +12,7 @@ TENSORFLOW_API_INIT_FILES = [
"__internal__/distribute/multi_process_runner/__init__.py", "__internal__/distribute/multi_process_runner/__init__.py",
"__internal__/eager_context/__init__.py", "__internal__/eager_context/__init__.py",
"__internal__/function/__init__.py", "__internal__/function/__init__.py",
"__internal__/monitoring/__init__.py",
"__internal__/nest/__init__.py", "__internal__/nest/__init__.py",
"__internal__/ops/__init__.py", "__internal__/ops/__init__.py",
"__internal__/test/__init__.py", "__internal__/test/__init__.py",

View File

@ -0,0 +1,14 @@
path: "tensorflow.__internal__.monitoring.BoolGauge"
tf_class {
is_instance: "<class \'tensorflow.python.eager.monitoring.BoolGauge\'>"
is_instance: "<class \'tensorflow.python.eager.monitoring.Metric\'>"
is_instance: "<type \'object\'>"
member_method {
name: "__init__"
argspec: "args=[\'self\', \'name\', \'description\'], varargs=labels, keywords=None, defaults=None"
}
member_method {
name: "get_cell"
argspec: "args=[\'self\'], varargs=labels, keywords=None, defaults=None"
}
}

View File

@ -0,0 +1,7 @@
path: "tensorflow.__internal__.monitoring"
tf_module {
member {
name: "BoolGauge"
mtype: "<type \'type\'>"
}
}

View File

@ -32,6 +32,10 @@ tf_module {
name: "function" name: "function"
mtype: "<type \'module\'>" mtype: "<type \'module\'>"
} }
member {
name: "monitoring"
mtype: "<type \'module\'>"
}
member { member {
name: "nest" name: "nest"
mtype: "<type \'module\'>" mtype: "<type \'module\'>"