-
-
Notifications
You must be signed in to change notification settings - Fork 719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outdated and/or unclear documentation about SchedulerPlugin #8719
Comments
@RaphaelRobidas: Thanks for reporting this issue. There are several things going on here, so let me try to unpack them:
This is a good catch, the documentation is a bit unclear here. Note that the RabbitMQ Example contains this line:
From what I can tell, the example you mention copies that pattern, but we improve it by importing
Your script does indeed not register the scheduler plugin, which is why you don't see an exception being logged. As an aside, raising an exception within distributed/distributed/scheduler.py Lines 2072 to 2077 in 03035da
This is by design to avoid scheduler corruption by faulty user code.
There are two ways to register a plugin: With a scheduler preload script (which is what the example you mention in the beginning does) and via |
@hendrikmakait Thanks for the detailed reply, see PR #8729! |
Describe the issue:
The current documentation regarding SchedulerPlugin with full task state access gives the following code as example:
The
dask_setup
function seems to appear out of no-where andclick
isn't imported. Moreover, this approach does not seem to correctly register the plugin. For example, the follow code runs successfully:The console log reads "2", while we would expect an Exception to be raised.
It is unclear how to register a scheduler plugin that can access the full task state.
client.scheduler
does not seem to be serializable, so the following code does not work and crashes with the errorTypeError: cannot pickle 'coroutine' object
:Environment:
The text was updated successfully, but these errors were encountered: