neulab/docprompting-conala huggingface dataset:
tf.compat.v1.flags.mark_flags_as_mutual_exclusive Ensures that only one flag among flag_names is not None.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.mark_flags_as_mutual_exclusive  
tf.compat.v1.flags.mark_flags_as_mutual_exclusive(
    flag_names, required=False, flag_values=_flagvalues.FLAGS
)
 Important note: This validator checks if flag values are None, and it does not distinguish between default and explicit values. Therefore, this validator does not make sense when applied to flags with default values other than None, including other false values (e.g. False, 0, '', []). That includes multi flags with a default value of [] instead of None.
 


 Args
  flag_names   [str], names of the flags.  
  required   bool. If true, exactly one of the flags must have a value other than None. Otherwise, at most one of the flags can have a value other than None, and it is valid for all of the flags to be None.  
  flag_values   flags.FlagValues, optional FlagValues instance where the flags are defined.
tf.compat.v1.flags.mark_flags_as_required Ensures that flags are not None during program execution.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.mark_flags_as_required  
tf.compat.v1.flags.mark_flags_as_required(
    flag_names, flag_values=_flagvalues.FLAGS
)
 If your module might be imported by others, and you only wish to make the flag required when the module is directly executed, call this method like this: if name == 'main': flags.mark_flags_as_required(['flag1', 'flag2', 'flag3']) app.run()
 


 Args
  flag_names   Sequence[str], names of the flags.  
  flag_values   flags.FlagValues, optional FlagValues instance where the flags are defined.   
 


 Raises
  AttributeError   If any of flag name has not already been defined as a flag.
tf.compat.v1.flags.mark_flag_as_required Ensures that flag is not None during program execution.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.mark_flag_as_required  
tf.compat.v1.flags.mark_flag_as_required(
    flag_name, flag_values=_flagvalues.FLAGS
)
 Registers a flag validator, which will follow usual validator rules. Important note: validator will pass for any non-None value, such as False, 0 (zero), '' (empty string) and so on. If your module might be imported by others, and you only wish to make the flag required when the module is directly executed, call this method like this: if name == 'main': flags.mark_flag_as_required('your_flag_name') app.run()
 


 Args
  flag_name   str, name of the flag  
  flag_values   flags.FlagValues, optional FlagValues instance where the flag is defined.   
 


 Raises
  AttributeError   Raised when flag_name is not registered as a valid flag name.
tf.compat.v1.flags.MultiEnumClassFlag A multi_enum_class flag. Inherits From: MultiFlag, Flag  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.MultiEnumClassFlag  
tf.compat.v1.flags.MultiEnumClassFlag(
    name, default, help_string, enum_class, case_sensitive=False, **args
)
 See the doc for MultiFlag for most behaviors of this class. In addition, this class knows how to handle enum.Enum instances as values for this flag type.
 


 Attributes
  value  
   Methods flag_type 
flag_type()
 See base class. parse 
parse(
    arguments
)
 Parses one or more arguments with the installed parser.
 


 Args
  arguments   a single argument or a list of arguments (typically a list of default values); a single argument is converted internally into a list containing one item.    serialize 
serialize()
 Serializes the flag. unparse 
unparse()
 __eq__ 
__eq__(
    other
)
 Return self==value. __ge__ 
__ge__(
    other, NotImplemented=NotImplemented
)
 Return a >= b. Computed by @total_ordering from (not a < b). __gt__ 
__gt__(
    other, NotImplemented=NotImplemented
)
 Return a > b. Computed by @total_ordering from (not a < b) and (a != b). __le__ 
__le__(
    other, NotImplemented=NotImplemented
)
 Return a <= b. Computed by @total_ordering from (a < b) or (a == b). __lt__ 
__lt__(
    other
)
 Return self<value.
tf.compat.v1.flags.MultiFlag A flag that can appear multiple time on the command-line. Inherits From: Flag  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.MultiFlag  
tf.compat.v1.flags.MultiFlag(
    *args, **kwargs
)
 The value of such a flag is a list that contains the individual values from all the appearances of that flag on the command-line. See the doc for Flag for most behavior of this class. Only differences in behavior are described here:  The default value may be either a single value or an iterable of values. A single value is transformed into a single-item list of that value. The value of the flag is always a list, even if the option was only supplied once, and even if the default value is a single value 
 


 Attributes
  value  
   Methods flag_type 
flag_type()
 See base class. parse 
parse(
    arguments
)
 Parses one or more arguments with the installed parser.
 


 Args
  arguments   a single argument or a list of arguments (typically a list of default values); a single argument is converted internally into a list containing one item.    serialize 
serialize()
 Serializes the flag. unparse 
unparse()
 __eq__ 
__eq__(
    other
)
 Return self==value. __ge__ 
__ge__(
    other, NotImplemented=NotImplemented
)
 Return a >= b. Computed by @total_ordering from (not a < b). __gt__ 
__gt__(
    other, NotImplemented=NotImplemented
)
 Return a > b. Computed by @total_ordering from (not a < b) and (a != b). __le__ 
__le__(
    other, NotImplemented=NotImplemented
)
 Return a <= b. Computed by @total_ordering from (a < b) or (a == b). __lt__ 
__lt__(
    other
)
 Return self<value.
tf.compat.v1.flags.multi_flags_validator A function decorator for defining a multi-flag validator.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.multi_flags_validator  
tf.compat.v1.flags.multi_flags_validator(
    flag_names, message='Flag validation failed',
    flag_values=_flagvalues.FLAGS
)
 Registers the decorated function as a validator for flag_names, e.g. @flags.multi_flags_validator(['foo', 'bar']) def _CheckFooBar(flags_dict): ... See register_multi_flags_validator() for the specification of checker function.
 


 Args
  flag_names   [str], a list of the flag names to be checked.  
  message   str, error text to be shown to the user if checker returns False. If checker raises flags.ValidationError, message from the raised error will be shown.  
  flag_values   flags.FlagValues, optional FlagValues instance to validate against.   
 


 Returns   A function decorator that registers its function argument as a validator.  

 


 Raises
  AttributeError   Raised when a flag is not registered as a valid flag name.
tf.compat.v1.flags.register_multi_flags_validator Adds a constraint to multiple flags.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.register_multi_flags_validator  
tf.compat.v1.flags.register_multi_flags_validator(
    flag_names, multi_flags_checker, message='Flags validation failed',
    flag_values=_flagvalues.FLAGS
)
 The constraint is validated when flags are initially parsed, and after each change of the corresponding flag's value.
 


 Args
  flag_names   [str], a list of the flag names to be checked.  
  multi_flags_checker   callable, a function to validate the flag. input - dict, with keys() being flag_names, and value for each key being the value of the corresponding flag (string, boolean, etc). output - bool, True if validator constraint is satisfied. If constraint is not satisfied, it should either return False or raise flags.ValidationError.  
  message   str, error text to be shown to the user if checker returns False. If checker raises flags.ValidationError, message from the raised error will be shown.  
  flag_values   flags.FlagValues, optional FlagValues instance to validate against.   
 


 Raises
  AttributeError   Raised when a flag is not registered as a valid flag name.
tf.compat.v1.flags.register_validator Adds a constraint, which will be enforced during program execution.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.register_validator  
tf.compat.v1.flags.register_validator(
    flag_name, checker, message='Flag validation failed',
    flag_values=_flagvalues.FLAGS
)
 The constraint is validated when flags are initially parsed, and after each change of the corresponding flag's value. Args: flag_name: str, name of the flag to be checked. checker: callable, a function to validate the flag. input - A single positional argument: The value of the corresponding flag (string, boolean, etc. This value will be passed to checker by the library). output - bool, True if validator constraint is satisfied. If constraint is not satisfied, it should either return False or raise flags.ValidationError(desired_error_message). message: str, error text to be shown to the user if checker returns False. If checker raises flags.ValidationError, message from the raised error will be shown. flag_values: flags.FlagValues, optional FlagValues instance to validate against. Raises: AttributeError: Raised when flag_name is not registered as a valid flag name.
tf.compat.v1.flags.text_wrap Wraps a given text to a maximum line length and returns it.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.text_wrap  
tf.compat.v1.flags.text_wrap(
    text, length=None, indent='', firstline_indent=None
)
 It turns lines that only contain whitespace into empty lines, keeps new lines, and expands tabs using 4 spaces.
 


 Args
  text   str, text to wrap.  
  length   int, maximum length of a line, includes indentation. If this is None then use get_help_width()  
  indent   str, indent for all but first line.  
  firstline_indent   str, indent for first line; if None, fall back to indent.   
 


 Returns   str, the wrapped text.  

 


 Raises
  ValueError   Raised if indent or firstline_indent not shorter than length.
Module: tf.compat.v1.flags.tf_decorator Base TFDecorator class and utility functions for working with decorators.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator  There are two ways to create decorators that TensorFlow can introspect into. This is important for documentation generation purposes, so that function signatures aren't obscured by the (*args, **kwds) signature that decorators often provide.  Call tf_decorator.make_decorator on your wrapper function. If your decorator is stateless, or can capture all of the variables it needs to work with through lexical closure, this is the simplest option. Create your wrapper function as usual, but instead of returning it, return tf_decorator.make_decorator(target, your_wrapper). This will attach some decorator introspection metadata onto your wrapper and return it.  Example: def print_hello_before_calling(target): def wrapper(*args, *kwargs): print('hello') return target(args, **kwargs) return tf_decorator.make_decorator(target, wrapper)  Derive from TFDecorator. If your decorator needs to be stateful, you can implement it in terms of a TFDecorator. Store whatever state you need in your derived class, and implement the __call__ method to do your work before calling into your target. You can retrieve the target via super(MyDecoratorClass, self).decorated_target, and call it with whatever parameters it needs.  Example: class CallCounter(tf_decorator.TFDecorator): def init(self, target): super(CallCounter, self).init('count_calls', target) self.call_count = 0 def call(self, *args, *kwargs): self.call_count += 1 return super(CallCounter, self).decorated_target(args, **kwargs) def count_calls(target): return CallCounter(target) Modules tf_stack module: Functions used to extract and analyze stacks. Faster than Python libs. Classes class TFDecorator: Base class for all TensorFlow decorators. Functions make_decorator(...): Make a decorator from a wrapper and a target. rewrap(...): Injects a new target into a function built by make_decorator. unwrap(...): Unwraps an object into a list of TFDecorators and a final target.
tf.compat.v1.flags.tf_decorator.make_decorator Make a decorator from a wrapper and a target.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.make_decorator  
tf.compat.v1.flags.tf_decorator.make_decorator(
    target, decorator_func, decorator_name=None, decorator_doc='',
    decorator_argspec=None
)

 


 Args
  target   The final callable to be wrapped.  
  decorator_func   The wrapper function.  
  decorator_name   The name of the decorator. If None, the name of the function calling make_decorator.  
  decorator_doc   Documentation specific to this application of decorator_func to target.  
  decorator_argspec   The new callable signature of this decorator.   
 


 Returns   The decorator_func argument with new metadata attached.
tf.compat.v1.flags.tf_decorator.rewrap Injects a new target into a function built by make_decorator.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.rewrap  
tf.compat.v1.flags.tf_decorator.rewrap(
    decorator_func, previous_target, new_target
)
 This function allows replacing a function wrapped by decorator_func, assuming the decorator that wraps the function is written as described below. The decorator function must use <decorator name>.__wrapped__ instead of the wrapped function that is normally used: Example: Instead of this: def simple_parametrized_wrapper(*args, *kwds): return wrapped_fn(args, **kwds) tf_decorator.make_decorator(simple_parametrized_wrapper, wrapped_fn) Write this: def simple_parametrized_wrapper(*args, *kwds): return simple_parametrizedwrapper.wrapped_(args, **kwds) tf_decorator.make_decorator(simple_parametrized_wrapper, wrapped_fn) Note that this process modifies decorator_func.
 


 Args
  decorator_func   Callable returned by wrap.  
  previous_target   Callable that needs to be replaced.  
  new_target   Callable to replace previous_target with.   
 


 Returns   The updated decorator. If decorator_func is not a tf_decorator, new_target is returned.
tf.compat.v1.flags.tf_decorator.TFDecorator Base class for all TensorFlow decorators.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.TFDecorator  
tf.compat.v1.flags.tf_decorator.TFDecorator(
    decorator_name, target, decorator_doc='', decorator_argspec=None
)
 TFDecorator captures and exposes the wrapped target, and provides details about the current decorator.
 


 Attributes
  decorated_target  
 
  decorator_argspec  
 
  decorator_doc  
 
  decorator_name  
   Methods __call__ View source 
__call__(
    *args, **kwargs
)
 Call self as a function.
Module: tf.compat.v1.flags.tf_decorator.tf_stack Functions used to extract and analyze stacks. Faster than Python libs.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.tf_stack  Classes class CurrentModuleFilter: Filters stack frames from the module where this is used (best effort). class FrameSummary class StackSummary class StackTraceFilter: Allows filtering traceback information by removing superfluous frames. class StackTraceMapper: Allows remapping traceback information to different source code. class StackTraceTransform: Base class for stack trace transformation functions. Functions extract_stack(...): A lightweight, extensible re-implementation of traceback.extract_stack.
tf.compat.v1.flags.tf_decorator.tf_stack.CurrentModuleFilter Filters stack frames from the module where this is used (best effort). Inherits From: StackTraceFilter, StackTraceTransform  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.tf_stack.CurrentModuleFilter  
tf.compat.v1.flags.tf_decorator.tf_stack.CurrentModuleFilter()
 Methods get_filtered_filenames View source 
get_filtered_filenames()
 reset View source 
reset()
 __enter__ View source 
__enter__()
 __exit__ View source 
__exit__(
    unused_type, unused_value, unused_traceback
)
tf.compat.v1.flags.tf_decorator.tf_stack.extract_stack A lightweight, extensible re-implementation of traceback.extract_stack.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.tf_stack.extract_stack  
tf.compat.v1.flags.tf_decorator.tf_stack.extract_stack(
    limit=-1
)
 NOTE(mrry): traceback.extract_stack eagerly retrieves the line of code for each stack frame using linecache, which results in an abundance of stat() calls. This implementation does not retrieve the code, and any consumer should apply _convert_stack to the result to obtain a traceback that can be formatted etc. using traceback methods.
 


 Args
  limit   A limit on the number of frames to return.   
 


 Returns   A sequence of FrameSummary objects (filename, lineno, name, line) corresponding to the call stack of the current thread.
tf.compat.v1.flags.tf_decorator.tf_stack.FrameSummary  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.tf_stack.FrameSummary  
tf.compat.v1.flags.tf_decorator.tf_stack.FrameSummary(
    *args, **kwargs
)

 


 Attributes
  filename  
 
  line  
 
  lineno  
 
  name  
   Methods __eq__ 
__eq__()
 eq(self: tensorflow.python._tf_stack.FrameSummary, arg0: tensorflow.python._tf_stack.FrameSummary) -> bool __getitem__ 
__getitem__()
 getitem(self: tensorflow.python._tf_stack.FrameSummary, arg0: object) -> object __iter__ 
__iter__()
 iter(self: tensorflow.python._tf_stack.FrameSummary) -> iterator __len__ 
__len__()
 len(self: tensorflow.python._tf_stack.FrameSummary) -> int __ne__ 
__ne__()
 ne(self: tensorflow.python._tf_stack.FrameSummary, arg0: tensorflow.python._tf_stack.FrameSummary) -> bool
tf.compat.v1.flags.tf_decorator.tf_stack.StackSummary  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.tf_stack.StackSummary  
tf.compat.v1.flags.tf_decorator.tf_stack.StackSummary()
 Methods append 
append()
 append(self: tensorflow.python._tf_stack.StackSummary, x: tensorflow.python._tf_stack.FrameSummary) -> None Add an item to the end of the list count 
count()
 count(self: tensorflow.python._tf_stack.StackSummary, x: tensorflow.python._tf_stack.FrameSummary) -> int Return the number of times x appears in the list extend 
extend()
 extend(*args, **kwargs) Overloaded function.  extend(self: tensorflow.python._tf_stack.StackSummary, L: tensorflow.python._tf_stack.StackSummary) -> None  Extend the list by appending all the items in the given list  extend(self: tensorflow.python._tf_stack.StackSummary, L: iterable) -> None  Extend the list by appending all the items in the given list insert 
insert()
 insert(self: tensorflow.python._tf_stack.StackSummary, i: int, x: tensorflow.python._tf_stack.FrameSummary) -> None Insert an item at a given position. pop 
pop()
 pop(*args, **kwargs) Overloaded function.  pop(self: tensorflow.python._tf_stack.StackSummary) -> tensorflow.python._tf_stack.FrameSummary  Remove and return the last item  pop(self: tensorflow.python._tf_stack.StackSummary, i: int) -> tensorflow.python._tf_stack.FrameSummary  Remove and return the item at index i remove 
remove()
 remove(self: tensorflow.python._tf_stack.StackSummary, x: tensorflow.python._tf_stack.FrameSummary) -> None Remove the first item from the list whose value is x. It is an error if there is no such item. __bool__ 
__bool__()
 bool(self: tensorflow.python._tf_stack.StackSummary) -> bool Check whether the list is nonempty __contains__ 
__contains__()
 contains(self: tensorflow.python._tf_stack.StackSummary, x: tensorflow.python._tf_stack.FrameSummary) -> bool Return true the container contains x __eq__ 
__eq__()
 eq(self: tensorflow.python._tf_stack.StackSummary, arg0: tensorflow.python._tf_stack.StackSummary) -> bool __getitem__ 
__getitem__()
 getitem(*args, **kwargs) Overloaded function.  
getitem(self: tensorflow.python._tf_stack.StackSummary, s: slice) -> tensorflow.python._tf_stack.StackSummary  Retrieve list elements using a slice object  getitem(self: tensorflow.python._tf_stack.StackSummary, arg0: int) -> tensorflow.python._tf_stack.FrameSummary getitem(self: tensorflow.python._tf_stack.StackSummary, arg0: int) -> tensorflow.python._tf_stack.FrameSummary  __iter__ 
__iter__()
 iter(self: tensorflow.python._tf_stack.StackSummary) -> iterator __len__ 
__len__()
 len(self: tensorflow.python._tf_stack.StackSummary) -> int __ne__ 
__ne__()
 ne(self: tensorflow.python._tf_stack.StackSummary, arg0: tensorflow.python._tf_stack.StackSummary) -> bool
tf.compat.v1.flags.tf_decorator.tf_stack.StackTraceFilter Allows filtering traceback information by removing superfluous frames. Inherits From: StackTraceTransform  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.tf_stack.StackTraceFilter  Methods get_filtered_filenames View source 
get_filtered_filenames()
 reset View source 
reset()
 __enter__ View source 
__enter__()
 __exit__ View source 
__exit__(
    unused_type, unused_value, unused_traceback
)
tf.compat.v1.flags.tf_decorator.tf_stack.StackTraceMapper Allows remapping traceback information to different source code. Inherits From: StackTraceTransform  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.tf_stack.StackTraceMapper  Methods get_effective_source_map View source 
get_effective_source_map()
 Returns a map (filename, lineno) -> (filename, lineno, function_name). reset View source 
reset()
 __enter__ View source 
__enter__()
 __exit__ View source 
__exit__(
    unused_type, unused_value, unused_traceback
)
tf.compat.v1.flags.tf_decorator.tf_stack.StackTraceTransform Base class for stack trace transformation functions.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.tf_stack.StackTraceTransform  Methods reset View source 
reset()
 __enter__ View source 
__enter__()
 __exit__ View source 
__exit__(
    unused_type, unused_value, unused_traceback
)
tf.compat.v1.flags.tf_decorator.unwrap Unwraps an object into a list of TFDecorators and a final target.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.unwrap  
tf.compat.v1.flags.tf_decorator.unwrap(
    maybe_tf_decorator
)

 


 Args
  maybe_tf_decorator   Any callable object.   
 


 Returns   A tuple whose first element is an list of TFDecorator-derived objects that were applied to the final callable target, and whose second element is the final undecorated callable target. If the maybe_tf_decorator parameter is not decorated by any TFDecorators, the first tuple element will be an empty list. The TFDecorator list is ordered from outermost to innermost decorators.
tf.compat.v1.flags.UnparsedFlagAccessError Raised when accessing the flag value from unparsed FlagValues. Inherits From: Error  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.UnparsedFlagAccessError
tf.compat.v1.flags.UnrecognizedFlagError Raised when a flag is unrecognized. Inherits From: Error  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.UnrecognizedFlagError  
tf.compat.v1.flags.UnrecognizedFlagError(
    flagname, flagvalue='', suggestions=None
)

 


 Attributes
  flagname   str, the name of the unrecognized flag.  
  flagvalue   The value of the flag, empty if the flag is not defined.
tf.compat.v1.flags.ValidationError Raised when flag validator constraint is not satisfied. Inherits From: Error  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.ValidationError