Skip to content
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

Drop usage of WhoHas & WhatHas from Client #4863

Merged
merged 3 commits into from
May 28, 2021

Conversation

jakirkham
Copy link
Member

PR ( #4853 ) ran into some issues, which was largely reverted by PR ( #4860 ). However there are some lingering issues, this tries to revert the remaining pieces.

cc @dantegd @quasiben @jrbourbeau

  • Closes #xxxx
  • Tests added / passed
  • Passes black distributed / flake8 distributed / isort distributed

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to comment out / revert these checks too

assert type(who_has) is WhoHas
assert type(has_what) is HasWhat

@jakirkham
Copy link
Member Author

jakirkham commented May 28, 2021

Thanks marked that xfail. Guessing we will want to come back and straighten this out after the release. Though if we want to change more, happy to do so.

FWIW here's a CI log where we were seeing this issue, which traces back to here in cuML:

>       return WhoHas(result)
07:29:48 E       TypeError: 'coroutine' object is not iterable

Dante and I have been trying to reproduce with variations of this:

from time import sleep
from distributed import Client

def inc(i):
    sleep(60)
    return i + 1

async with Client(asynchronous=True, n_workers=1) as c:
    f = c.submit(inc, 0)
    d = await c.who_has(f.key)
    print(d)

However we haven't quite narrowed down a reproducer. Guessing something like that would trigger the error. Though there is likely something simple we are overlooking.

Sorry this isn't more helpful. Hopefully that at least gives some context though 🙂

@jrbourbeau
Copy link
Member

Hmm that's interesting, it looks like self.sync(self.scheduler.who_has, keys=keys, **kwargs) is returning a coroutine even though self.asynchronous is False-y. I wonder if using inspect.isawaitable instead of self.asynchronous would be a more robust check

@jakirkham
Copy link
Member Author

Yeah it's odd. Also confused as to why we haven't been able to reproduce it. That makes sense. I think for now we are ok just reverting, but happy to try that after the release

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes here look good for getting the release out today. @jakirkham could you remove the draft status of this PR when you're ready for it to be merged?

@jakirkham jakirkham marked this pull request as ready for review May 28, 2021 19:38
@jakirkham
Copy link
Member Author

Should be good to go. Sorry we were just testing on our end to make sure things were cleared up

@jakirkham jakirkham merged commit 0eeee27 into dask:main May 28, 2021
@jakirkham jakirkham deleted the drop_whowhat_client branch May 28, 2021 20:00
@jakirkham
Copy link
Member Author

FWIW this CI log shows the issue is fixed 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants