MCPcopy
hub / github.com/dmlc/dgl / _init_internal_api

Function _init_internal_api

python/dgl/_ffi/function.py:333–347  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

331
332
333def _init_internal_api():
334 for name in list_global_func_names():
335 if not name.startswith("_") or name.startswith("_deprecate"):
336 # normal APIs are ignored
337 continue
338 target_module = sys.modules["dgl._api_internal"]
339 fname = name
340 if fname.find(".") != -1:
341 print('Warning: invalid API name "%s".' % fname)
342 continue
343 f = get_global_func(name)
344 ff = _get_api(f)
345 ff.__name__ = fname
346 ff.__doc__ = "DGL PackedFunc %s. " % fname
347 setattr(target_module, ff.__name__, ff)
348
349
350_set_class_function(Function)

Callers 1

base.pyFile · 0.85

Calls 3

list_global_func_namesFunction · 0.85
get_global_funcFunction · 0.85
_get_apiFunction · 0.85

Tested by

no test coverage detected