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

Class HLGCollection

dask/tests/test_typing.py:98–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96
97
98class HLGCollection(DaskMethodsMixin):
99 def __init__(self, based_on: HLGDaskCollection) -> None:
100 self.based_on = based_on
101
102 def __dask_graph__(self) -> Graph:
103 return self.based_on.__dask_graph__()
104
105 def __dask_layers__(self) -> Sequence[str]:
106 return self.based_on.__dask_layers__()
107
108 def __dask_keys__(self) -> NestedKeys:
109 return self.based_on.__dask_keys__()
110
111 def __dask_postcompute__(self) -> tuple[PostComputeCallable, tuple]:
112 return finalize, ()
113
114 def __dask_postpersist__(self) -> tuple[PostPersistCallable, tuple]:
115 return self.based_on.__dask_postpersist__()
116
117 def __dask_tokenize__(self) -> Hashable:
118 return tokenize(self.based_on)
119
120 __dask_scheduler__ = staticmethod(get1)
121
122 __dask_optimize__ = globalmethod(
123 dont_optimize,
124 key="hlgcollection_optim",
125 falsey=dont_optimize,
126 )
127
128
129class NotHLGCollection(DaskMethodsMixin):

Callers 2

test_isinstance_customFunction · 0.85
test_parameter_passingFunction · 0.85

Calls 1

globalmethodFunction · 0.90

Tested by 2

test_isinstance_customFunction · 0.68
test_parameter_passingFunction · 0.68