MCPcopy Create free account
hub / github.com/dask/dask / CallableLazyImport

Class CallableLazyImport

dask/layers.py:29–42  ·  view source on GitHub ↗

Function Wrapper for Lazy Importing. This Class should only be used when materializing a graph on a distributed scheduler.

Source from the content-addressed store, hash-verified

27
28
29class CallableLazyImport:
30 """Function Wrapper for Lazy Importing.
31
32 This Class should only be used when materializing a graph
33 on a distributed scheduler.
34 """
35
36 def __init__(self, function_path):
37 self.function_path = function_path
38
39 def __call__(self, *args, **kwargs):
40 from distributed.utils import import_term
41
42 return import_term(self.function_path)(*args, **kwargs)
43
44
45#

Callers 1

_construct_graphMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected