Finalizer function and optional arguments to construct final result. Upon computation each key in the collection will have an in memory result, the postcompute function combines each key's result into a final in memory representation. For example, dask.array.Array co
(self)
| 160 | |
| 161 | @abc.abstractmethod |
| 162 | def __dask_postcompute__(self) -> tuple[PostComputeCallable, tuple]: |
| 163 | """Finalizer function and optional arguments to construct final result. |
| 164 | |
| 165 | Upon computation each key in the collection will have an in |
| 166 | memory result, the postcompute function combines each key's |
| 167 | result into a final in memory representation. For example, |
| 168 | dask.array.Array concatenates the arrays at each chunk into a |
| 169 | final in-memory array. |
| 170 | |
| 171 | Returns |
| 172 | ------- |
| 173 | PostComputeCallable |
| 174 | Callable that receives the sequence of the results of each |
| 175 | final key along with optional arguments. An example signature |
| 176 | would be ``finalize(results: Sequence[Any], *args)``. |
| 177 | tuple[Any, ...] |
| 178 | Optional arguments passed to the function following the |
| 179 | key results (the `*args` part of the |
| 180 | ``PostComputeCallable``. If no additional arguments are to |
| 181 | be passed then this must be an empty tuple. |
| 182 | |
| 183 | """ |
| 184 | raise NotImplementedError("Inheriting class must implement this method.") |
| 185 | |
| 186 | @abc.abstractmethod |
| 187 | def __dask_postpersist__(self) -> tuple[PostPersistCallable, tuple]: |
nothing calls this directly
no outgoing calls
no test coverage detected