-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Milestone
Description
The __init__ method in Callback is:
def __init__(self, start=None, pretask=None, posttask=None, finish=None):
self._start = start
self._pretask = pretask
self._posttask = posttask
self._finish = finish
which overrides callbacks defined in subclasses, e.g.:
class TaskCounter(Callback):
def _pretask(self, key, dask, state):
count(key, dask, state)
which doesn't work, while:
class TaskCounter(Callback):
def __init__(self):
pass
def _pretask(self, key, dask, state):
count(key, dask, state)
does. Not sure quite what desired behavior here is, but the example in the docs:
class PrintKeys(Callback):
def _pretask(self, key, dask, state):
"""Print the key of every task as it's started"""
print("Computing: {0}!".format(repr(key)))
doesn't work.
Metadata
Metadata
Assignees
Labels
No labels