Update all UCX tests to use asyncio marker#5484
Merged
Conversation
By marking all UCX tests as asyncio we ensure that they all use the fixture that properly releases UCX resources once the event loop is closed.
Member
|
Looks like def reset():
"""Resets the UCX library by shutting down all of UCX.
The library is initiated at next API call.
"""
global _ctx
if _ctx is not None:
weakref_ctx = weakref.ref(_ctx)
_ctx = None
gc.collect()
if weakref_ctx() is not None:
msg = (
"Trying to reset UCX but not all Endpoints and/or Listeners "
"are closed(). The following objects are still referencing "
"ApplicationContext: "
)
for o in gc.get_referrers(weakref_ctx()):
msg += "\n %s" % str(o)
> raise UCXError(msg)
E ucp.exceptions.UCXError: Trying to reset UCX but not all Endpoints and/or Listeners are closed(). The following objects are still referencing ApplicationContext:
E {'_ep': <ucp._libs.ucx_api.UCXEndpoint object at 0x7fe4d2cb5900>, '_ctx': <ucp.core.ApplicationContext object at 0x7fe4d2cb6460>, '_send_count': 1714, '_recv_count': 214, '_finished_recv_count': 214, '_shutting_down_peer': False, '_close_after_n_recv': None, '_tags': {'msg_send': 17641360423509091357, 'msg_recv': 858844837446935544, 'ctrl_send': 1644723418746821278, 'ctrl_recv': 523734172212257047}} |
Member
Author
|
Thanks @jakirkham , should be fixed now. Failing test shouldn't be related. cc @quasiben |
Member
|
Thanks Peter! 😄 There seem to be other test failures. However they don't appear to be related to UCX (and therefore not related to the changes here). Going to go ahead and merge |
3 tasks
Member
Author
|
Thanks for reviewing and merging, John! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By marking all UCX tests as asyncio we ensure that they all use the fixture that properly releases UCX resources once the event loop is closed.
This should fix CI failures that have appeared in rapidsai/ucx-py#804, where a subset of Distributed tests run.