From 26192c9efceb0ca25b0166d06898319f6442ef12 Mon Sep 17 00:00:00 2001 From: Peter Andreas Entschev Date: Wed, 11 Sep 2024 12:36:36 -0700 Subject: [PATCH] Update version error message Update version error message to match the minimum support UCX version and provide instructions to check where UCX is being loaded from. --- ucp/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ucp/__init__.py b/ucp/__init__.py index e8058ba6..4ec25bc4 100644 --- a/ucp/__init__.py +++ b/ucp/__init__.py @@ -108,10 +108,13 @@ def _is_mig_device(handle): os.environ["UCX_PROTO_ENABLE"] = "n" +__ucx_min_version__ = "1.15.0" __ucx_version__ = "%d.%d.%d" % get_ucx_version() -if get_ucx_version() < (1, 15, 0): +if get_ucx_version() < tuple([int(i) for i in __ucx_min_version__.split(".")]): raise ImportError( f"Support for UCX {__ucx_version__} has ended. Please upgrade to " - "1.11.1 or newer." + f"{__ucx_min_version__} or newer. If you believe the wrong version " + "is being loaded, please check the path from where UCX is loaded " + "by rerunning with the environment variable `UCX_LOG_LEVEL=debug`." )