-
Notifications
You must be signed in to change notification settings - Fork 96
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
Handle import
ing relocated dispatch functions
#623
Handle import
ing relocated dispatch functions
#623
Conversation
d31caa5
to
f168cc1
Compare
This allows us to smooth over differences between Dask before the dispatch refactor and after.
Thanks @jakirkham for the work and @galipremsagar for the review! |
@gpucibot merge |
Seeing this on CI 19:52:07 ________________________ test_dataframes_share_dev_mem _________________________
19:52:07
19:52:07 def test_dataframes_share_dev_mem():
19:52:07 cudf = pytest.importorskip("cudf")
19:52:07
19:52:07 df = cudf.DataFrame({"a": range(10)})
19:52:07 > grouped = shuffle_group(df, "a", 0, 2, 2, False, 2)
19:52:07
19:52:07 dask_cuda/tests/test_proxify_host_file.py:109:
19:52:07 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
19:52:07 dask_cuda/proxify_device_objects.py:142: in wrapper
19:52:07 ret = func(*args, **kwargs)
19:52:07 /opt/conda/envs/rapids/lib/python3.7/site-packages/dask/dataframe/shuffle.py:816: in shuffle_group
19:52:07 ind = hash_object_dispatch(df[cols] if cols else df, index=False)
19:52:07 /opt/conda/envs/rapids/lib/python3.7/site-packages/dask/utils.py:511: in __call__
19:52:07 meth = self.dispatch(type(arg))
19:52:07 /opt/conda/envs/rapids/lib/python3.7/site-packages/dask/utils.py:499: in dispatch
19:52:07 return self.dispatch(cls) # recurse
19:52:07 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
19:52:07
19:52:07 self = <dask.utils.Dispatch object at 0x7fe9f6b57fd0>
19:52:07 cls = <class 'cudf.core.dataframe.DataFrame'>
19:52:07
19:52:07 def dispatch(self, cls):
19:52:07 """Return the function implementation for the given ``cls``"""
19:52:07 # Fast path with direct lookup on cls
19:52:07 lk = self._lookup
19:52:07 try:
19:52:07 impl = lk[cls]
19:52:07 except KeyError:
19:52:07 pass
19:52:07 else:
19:52:07 return impl
19:52:07 # Is a lazy registration function present?
19:52:07 toplevel, _, _ = cls.__module__.partition(".")
19:52:07 try:
19:52:07 register = self._lazy.pop(toplevel)
19:52:07 except KeyError:
19:52:07 pass
19:52:07 else:
19:52:07 register()
19:52:07 return self.dispatch(cls) # recurse
19:52:07 # Walk the MRO and cache the lookup result
19:52:07 for cls2 in inspect.getmro(cls)[1:]:
19:52:07 if cls2 in lk:
19:52:07 lk[cls] = lk[cls2]
19:52:07 return lk[cls2]
19:52:07 > raise TypeError("No dispatch for {0}".format(cls))
19:52:07 E TypeError: No dispatch for <class 'cudf.core.dataframe.DataFrame'>
19:52:07
19:52:07 /opt/conda/envs/rapids/lib/python3.7/site-packages/dask/utils.py:505: TypeError |
cc @madsbk |
This error is because |
rerun tests |
rerun tests (looks like packages are up now) |
Yeah saw that. Though it's not related to this change. Looks like some UCX configuration test failure. My inclination is to mark it as xfail so we can get this out and unblock people on CI who still need these changes. Thoughts? |
@pytest.mark.xfail(reason="https://github.com/rapidsai/dask-cuda/issues/627") | ||
def test_global_option(): | ||
for seg_size in ["2K", "1M", "2M"]: | ||
p = mp.Process(target=_test_global_option, args=(seg_size,)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok marked this test with xfail
so we can get these changes out-the-door to fix other CI issues. Though raised issue ( #627 ) to track/investigate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ok. @pentschev do you have any concerns? we are still in burn down so if something does crop up we have time to handle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For clarity cuDF's and RAFT's CI still fails without these changes, which is blocking a fair number of people. No objection to revisiting, but I do think we need to do this short term.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is weird, it never failed before, including in my nightly runs with both UCX 1.9 and UCX master. I'm actually concerned that this may be some error from a previous test that pytest is spilling over. I opened a PR to trigger CI in #628 , let's hold on and see if that fails too before merging this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree it is weird. I don't recall seeing this error on this PR before that build either.
Ok though JFYI before this came up, Ben had used a merge command upthread ( #623 (comment) ). So the bot may wind up merging this anyways if passes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, yeah, it was too quick, so no worries. I'm just now wondering if this isn't a bit dangerous, one could do any changes to the PR after someone told the bot to merge, and unless somebody sees it in time, it would be merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it probably should be associated with a commit hash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or just invalidated based on timestamp. If commit timestamp > gpucibot merge comment, invalidate automerge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean the time the commit was pushed, not the local commit timestamp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Submitted PR ( #630 ) to revert this piece. Probably still fails, but at least that gives us something to work from
Codecov Report
@@ Coverage Diff @@
## branch-21.06 #623 +/- ##
===============================================
Coverage ? 90.56%
===============================================
Files ? 15
Lines ? 1621
Branches ? 0
===============================================
Hits ? 1468
Misses ? 153
Partials ? 0 Continue to review full report at Codecov.
|
Requires PR ( rapidsai/cudf#8342 )
As these functions recently got relocated, handle
import
ing from the new location with a fallback to the old location.xref: dask/dask#7503
xref: dask/dask#7505