MCPcopy Create free account
hub / github.com/NVIDIA/DALI / _docstring_generator_call

Function _docstring_generator_call

dali/python/nvidia/dali/ops/_docs.py:358–383  ·  view source on GitHub ↗

Generate full docstring for `__call__` of Operator `op_name`.

(op_name, api="ops", args=None)

Source from the content-addressed store, hash-verified

356
357
358def _docstring_generator_call(op_name, api="ops", args=None):
359 """
360 Generate full docstring for `__call__` of Operator `op_name`.
361 """
362 schema = _b.GetSchema(op_name)
363 if schema.IsDocPartiallyHidden():
364 return ""
365 if schema.HasCallDox():
366 ret = schema.GetCallDox()
367 elif schema.HasInputDox():
368 ret = _docstring_prefix_from_inputs(op_name, api)
369 elif schema.CanUseAutoInputDox():
370 ret = _docstring_prefix_auto(op_name, api)
371 else:
372 op_full_name, _, _ = _names._process_op_name(op_name)
373 ret = "See :meth:`nvidia.dali.ops." + op_full_name + "` class for complete information.\n"
374 if schema.AppendKwargsSection():
375 # Kwargs section
376 tensor_kwargs = _get_kwargs(schema, api=api, args=args)
377 if tensor_kwargs:
378 ret += """
379Keyword Args
380------------
381"""
382 ret += tensor_kwargs
383 return ret
384
385
386def _docstring_generator_fn(schema_name, api="fn", args=None):

Callers

nothing calls this directly

Calls 9

_docstring_prefix_autoFunction · 0.85
_get_kwargsFunction · 0.85
IsDocPartiallyHiddenMethod · 0.80
HasCallDoxMethod · 0.80
GetCallDoxMethod · 0.80
HasInputDoxMethod · 0.80
CanUseAutoInputDoxMethod · 0.80
AppendKwargsSectionMethod · 0.80

Tested by

no test coverage detected