Remove deprecated arguments from the exported API declarations.
PiperOrigin-RevId: 238561912
This commit is contained in:
parent
fc3367e1c5
commit
fea13a48df
@ -88,20 +88,6 @@ from tensorflow.python.util.tf_export import tf_export
|
||||
# TODO(mdan): Add a test specific to this converter.
|
||||
|
||||
|
||||
# TODO(mdan): Remove when updating the API.
|
||||
@tf_export('autograph.experimental.Verbosity')
|
||||
class Verbosity(enum.IntEnum):
|
||||
"""Represents conversion verbosity levels.
|
||||
|
||||
Attributes:
|
||||
BRIEF: No logging, minimal error messages.
|
||||
VERBOSE: Detailed logging of generated code, detailed error messages.
|
||||
"""
|
||||
|
||||
BRIEF = 0
|
||||
VERBOSE = 1
|
||||
|
||||
|
||||
@tf_export('autograph.experimental.Feature')
|
||||
class Feature(enum.Enum):
|
||||
"""Represents conversion options that can be toggled on or off.
|
||||
|
@ -377,16 +377,12 @@ def _is_not_callable(obj):
|
||||
return False
|
||||
|
||||
|
||||
# TODO(mdan): Remove obsolete args.
|
||||
@tf_export('autograph.to_graph')
|
||||
def to_graph(entity,
|
||||
recursive=True,
|
||||
arg_values=None,
|
||||
arg_types=None,
|
||||
experimental_optional_features=converter.Feature.ALL,
|
||||
experimental_strip_decorators=None,
|
||||
experimental_verbose=converter.Verbosity.BRIEF,
|
||||
experimental_partial_types=None):
|
||||
experimental_optional_features=converter.Feature.ALL):
|
||||
"""Converts a Python entity into a TensorFlow graph.
|
||||
|
||||
Also see: `tf.autograph.to_code`, `tf.function`.
|
||||
@ -442,9 +438,6 @@ def to_graph(entity,
|
||||
experimental_optional_features: `None`, a tuple of, or a single
|
||||
`tf.autograph.experimental.Feature` value. Controls the use of
|
||||
optional features in the conversion process.
|
||||
experimental_strip_decorators: Deprecated, unused.
|
||||
experimental_verbose: Deprecated, unused.
|
||||
experimental_partial_types: Deprecated, unused.
|
||||
|
||||
Returns:
|
||||
Same as `entity`, the converted Python function or class.
|
||||
@ -452,10 +445,6 @@ def to_graph(entity,
|
||||
Raises:
|
||||
ValueError: If the entity could not be converted.
|
||||
"""
|
||||
del experimental_strip_decorators
|
||||
del experimental_verbose
|
||||
del experimental_partial_types
|
||||
|
||||
try:
|
||||
program_ctx = converter.ProgramContext(
|
||||
options=converter.ConversionOptions(
|
||||
@ -520,8 +509,7 @@ def to_code(entity,
|
||||
arg_values=None,
|
||||
arg_types=None,
|
||||
indentation=' ',
|
||||
experimental_optional_features=converter.Feature.ALL,
|
||||
experimental_partial_types=None):
|
||||
experimental_optional_features=converter.Feature.ALL):
|
||||
"""Similar to `to_graph`, but returns Python source code as a string.
|
||||
|
||||
Also see: `tf.autograph.to_graph`.
|
||||
@ -544,13 +532,10 @@ def to_code(entity,
|
||||
experimental_optional_features: `None`, a tuple of, or a single
|
||||
`tf.autograph.experimental.Feature` value. Controls the use of
|
||||
optional features in the conversion process.
|
||||
experimental_partial_types: Deprecated, unused.
|
||||
|
||||
Returns:
|
||||
The converted code as string.
|
||||
"""
|
||||
del experimental_partial_types
|
||||
|
||||
program_ctx = converter.ProgramContext(
|
||||
options=converter.ConversionOptions(
|
||||
recursive=recursive,
|
||||
|
@ -1,12 +0,0 @@
|
||||
path: "tensorflow.autograph.experimental.Verbosity"
|
||||
tf_class {
|
||||
is_instance: "<enum \'Verbosity\'>"
|
||||
member {
|
||||
name: "BRIEF"
|
||||
mtype: "<enum \'Verbosity\'>"
|
||||
}
|
||||
member {
|
||||
name: "VERBOSE"
|
||||
mtype: "<enum \'Verbosity\'>"
|
||||
}
|
||||
}
|
@ -4,8 +4,4 @@ tf_module {
|
||||
name: "Feature"
|
||||
mtype: "<class \'enum.EnumMeta\'>"
|
||||
}
|
||||
member {
|
||||
name: "Verbosity"
|
||||
mtype: "<class \'enum.EnumMeta\'>"
|
||||
}
|
||||
}
|
||||
|
@ -10,11 +10,11 @@ tf_module {
|
||||
}
|
||||
member_method {
|
||||
name: "to_code"
|
||||
argspec: "args=[\'entity\', \'recursive\', \'arg_values\', \'arg_types\', \'indentation\', \'experimental_optional_features\', \'experimental_partial_types\'], varargs=None, keywords=None, defaults=[\'True\', \'None\', \'None\', \' \', \'Feature.ALL\', \'None\'], "
|
||||
argspec: "args=[\'entity\', \'recursive\', \'arg_values\', \'arg_types\', \'indentation\', \'experimental_optional_features\'], varargs=None, keywords=None, defaults=[\'True\', \'None\', \'None\', \' \', \'Feature.ALL\'], "
|
||||
}
|
||||
member_method {
|
||||
name: "to_graph"
|
||||
argspec: "args=[\'entity\', \'recursive\', \'arg_values\', \'arg_types\', \'experimental_optional_features\', \'experimental_strip_decorators\', \'experimental_verbose\', \'experimental_partial_types\'], varargs=None, keywords=None, defaults=[\'True\', \'None\', \'None\', \'Feature.ALL\', \'None\', \'Verbosity.BRIEF\', \'None\'], "
|
||||
argspec: "args=[\'entity\', \'recursive\', \'arg_values\', \'arg_types\', \'experimental_optional_features\'], varargs=None, keywords=None, defaults=[\'True\', \'None\', \'None\', \'Feature.ALL\'], "
|
||||
}
|
||||
member_method {
|
||||
name: "trace"
|
||||
|
@ -1,12 +0,0 @@
|
||||
path: "tensorflow.autograph.experimental.Verbosity"
|
||||
tf_class {
|
||||
is_instance: "<enum \'Verbosity\'>"
|
||||
member {
|
||||
name: "BRIEF"
|
||||
mtype: "<enum \'Verbosity\'>"
|
||||
}
|
||||
member {
|
||||
name: "VERBOSE"
|
||||
mtype: "<enum \'Verbosity\'>"
|
||||
}
|
||||
}
|
@ -4,8 +4,4 @@ tf_module {
|
||||
name: "Feature"
|
||||
mtype: "<class \'enum.EnumMeta\'>"
|
||||
}
|
||||
member {
|
||||
name: "Verbosity"
|
||||
mtype: "<class \'enum.EnumMeta\'>"
|
||||
}
|
||||
}
|
||||
|
@ -10,11 +10,11 @@ tf_module {
|
||||
}
|
||||
member_method {
|
||||
name: "to_code"
|
||||
argspec: "args=[\'entity\', \'recursive\', \'arg_values\', \'arg_types\', \'indentation\', \'experimental_optional_features\', \'experimental_partial_types\'], varargs=None, keywords=None, defaults=[\'True\', \'None\', \'None\', \' \', \'Feature.ALL\', \'None\'], "
|
||||
argspec: "args=[\'entity\', \'recursive\', \'arg_values\', \'arg_types\', \'indentation\', \'experimental_optional_features\'], varargs=None, keywords=None, defaults=[\'True\', \'None\', \'None\', \' \', \'Feature.ALL\'], "
|
||||
}
|
||||
member_method {
|
||||
name: "to_graph"
|
||||
argspec: "args=[\'entity\', \'recursive\', \'arg_values\', \'arg_types\', \'experimental_optional_features\', \'experimental_strip_decorators\', \'experimental_verbose\', \'experimental_partial_types\'], varargs=None, keywords=None, defaults=[\'True\', \'None\', \'None\', \'Feature.ALL\', \'None\', \'Verbosity.BRIEF\', \'None\'], "
|
||||
argspec: "args=[\'entity\', \'recursive\', \'arg_values\', \'arg_types\', \'experimental_optional_features\'], varargs=None, keywords=None, defaults=[\'True\', \'None\', \'None\', \'Feature.ALL\'], "
|
||||
}
|
||||
member_method {
|
||||
name: "trace"
|
||||
|
Loading…
x
Reference in New Issue
Block a user