Home
last modified time | relevance | path

Searched refs:arg_spec (Results 1 – 11 of 11) sorted by relevance

/external/chromium-trace/catapult/common/py_trace_event/py_trace_event/trace_event_impl/
Ddecorators.py32 arg_spec = inspect.getargspec(func)
33 is_method = arg_spec.args and arg_spec.args[0] == "self"
36 arg_index = arg_spec.args.index(name)
37 defaults_length = len(arg_spec.defaults) if arg_spec.defaults else 0
38 default_index = arg_index + defaults_length - len(arg_spec.args)
40 default = arg_spec.defaults[default_index]
/external/tensorflow/tensorflow/python/tpu/
Dxla.py82 arg_spec = tf_inspect.getargspec(func)
83 num_func_args = len(arg_spec.args)
84 if arg_spec.defaults is None:
87 num_func_defaults = len(arg_spec.defaults)
91 if num_func_defaults == 0 and arg_spec.varargs is None:
95 if arg_spec.varargs is None and num_args_supplied > num_func_args:
/external/tensorflow/tensorflow/python/util/
Ddeprecation.py395 def _get_deprecated_positional_arguments(names_to_ok_vals, arg_spec): argument
415 name: pos for pos, name in enumerate(arg_spec.args)}
430 arg_spec = tf_inspect.getfullargspec(func)
432 deprecated_arg_names, arg_spec)
434 is_varargs_deprecated = arg_spec.varargs in deprecated_arg_names
435 is_kwargs_deprecated = arg_spec.varkw in deprecated_arg_names
439 known_args = arg_spec.args + [arg_spec.varargs, arg_spec.varkw]
486 if is_varargs_deprecated and len(args) > len(arg_spec.args):
487 invalid_args.append(arg_spec.varargs)
489 invalid_args.append(arg_spec.varkw)
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dfunction_api_info_test.cc41 for (const auto& arg_spec : input_args_spec) in SetArgs() local
42 SetArg(arg_spec.first, arg_spec.second, sig->add_input_arg()); in SetArgs()
43 for (const auto& arg_spec : output_args_spec) in SetArgs() local
44 SetArg(arg_spec.first, arg_spec.second, sig->add_output_arg()); in SetArgs()
/external/toolchain-utils/crosperf/
Dbenchmark_unittest.py60 arg_spec = inspect.getargspec(Benchmark.__init__)
61 self.assertEqual(len(arg_spec.args), len(args_list))
63 self.assertIn(arg, arg_spec.args)
Dbenchmark_run_unittest.py107 arg_spec = inspect.getargspec(benchmark_run.BenchmarkRun.__init__)
108 self.assertEqual(len(arg_spec.args), len(args_list))
109 self.assertEqual(arg_spec.args, args_list)
/external/tensorflow/tensorflow/python/autograph/pyct/
Dast_util.py339 arg_spec = tf_inspect.getfullargspec(self.fn)
342 if node_args != tuple(arg_spec.args):
345 if arg_spec.varargs != self._arg_name(node.args.vararg):
348 if arg_spec.varkw != self._arg_name(node.args.kwarg):
352 if node_kwonlyargs != tuple(arg_spec.kwonlyargs):
/external/tensorflow/tensorflow/contrib/compiler/
Dxla.py814 arg_spec = tf_inspect.getargspec(func)
815 num_func_args = len(arg_spec.args)
816 if arg_spec.defaults is None:
819 num_func_defaults = len(arg_spec.defaults)
823 if num_func_defaults == 0 and arg_spec.varargs is None:
827 if arg_spec.varargs is None and num_args_supplied > num_func_args:
/external/tensorflow/tensorflow/python/keras/utils/
Dgeneric_utils.py184 arg_spec = tf_inspect.getfullargspec(cls.from_config)
187 if 'custom_objects' in arg_spec.args:
303 arg_spec = tf_inspect.getfullargspec(fn)
304 if accept_all and arg_spec.varkw is not None:
306 return name in arg_spec.args
/external/tensorflow/tensorflow/python/ops/ragged/
Dragged_dispatch.py70 arg_spec = tf_inspect.getargspec(func)
76 if argname not in arg_spec.args:
78 (argname, func, arg_spec.args))
79 arg_infos.append(_ArgInfo(argname, arg_spec.args.index(argname), is_list))
/external/tensorflow/tensorflow/tools/compatibility/
Dtf_upgrade_v2_test.py335 arg_spec = tf_inspect.getfullargspec(method)
340 self.assertEqual(arg_spec[0][pos], arg)