This repository was archived by the owner on Sep 18, 2025. It is now read-only.
add warning for when UCX_MEM_MMAP_HOOK_MODE is set#626
Open
quasiben wants to merge 2 commits into
Open
Conversation
pentschev
suggested changes
Sep 30, 2020
pentschev
approved these changes
Sep 30, 2020
Member
|
Am seeing the following failure on CI. ___________________________ test_mem_mmap_hook_warn ____________________________
caplog = <_pytest.logging.LogCaptureFixture object at 0x7f138eb82850>
def test_mem_mmap_hook_warn(caplog):
"""
Test warning for UCX_MEM_MMAP_HOOK_MODE
"""
import logging
os.environ["UCX_MEM_MMAP_HOOK_MODE"] = "none"
# ucp.init will only print INFO LINES
with caplog.at_level(logging.INFO):
import ucp
> ucp.init()
tests/test_mmap_warn.py:16:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
options = {}, env_takes_precedence = False, blocking_progress_mode = None
def init(options={}, env_takes_precedence=False, blocking_progress_mode=None):
"""Initiate UCX.
Usually this is done automatically at the first API call
but this function makes it possible to set UCX options programmable.
Alternatively, UCX options can be specified through environment variables.
Parameters
----------
options: dict, optional
UCX options send to the underlying UCX library
env_takes_precedence: bool, optional
Whether environment variables takes precedence over the `options`
specified here.
blocking_progress_mode: bool, optional
If None, blocking UCX progress mode is used unless the environment variable
`UCXPY_NON_BLOCKING_MODE` is defined.
Otherwise, if True blocking mode is used and if False non-blocking mode is used.
"""
global _ctx
if _ctx is not None:
raise RuntimeError(
> "UCX is already initiated. Call reset() and init() "
"in order to re-initate UCX with new options."
)
E RuntimeError: UCX is already initiated. Call reset() and init() in order to re-initate UCX with new options.
ucp/core.py:755: RuntimeError |
Member
|
Hmmm, yeah testing for UCX variables can be really tricky. The "solution" for that would be calling |
Member
|
Yeah that's ok with me. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Related to #616
cc @pentschev