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
Can we demistify the order of @annotate and @delayed? #10410
Comments
Just to chip in on this discussion- I agree it's unclear to a novice, but I'm not sure it isn't just a consequence of Python decorators which often seem to cause confusion like this. Is a user likely to intend f() over g()? I think there are probably some legitimate use cases, but if there weren't or if there were relatively few, dask could raise a warning in the case of f? |
I think we're not advertising (nor testing) The fact that this works is more or less an implementation detail (it is using contextlib.contextmanager which defines the decorated function in a way that works for both) and I wouldn't even want to guarantee that this is something we'll keep supporting in the future (e.g. annotate could become a simple class implementing Given the limitations that are imposed by the language, I'll go ahead and close this as a won't fix. |
|
In dask/distributed#7954 (comment) I'm suggesting to remove the decorator for spans since the semantics are not straight forward. This issue is reinforcing this opinion |
Consider the following:
Both of the examples below look very elegant, and both make sense in certain conditions, but are fundamentally different:
It's very hard, for a novice dask user, to understand the difference between the two.
Is there anything we can do to mitigate this problem?
The text was updated successfully, but these errors were encountered: