From d3b8c6f02fea564a026d6c1045ca459f6ecfe918 Mon Sep 17 00:00:00 2001 From: Peter Andreas Entschev Date: Wed, 11 Sep 2024 12:50:01 -0700 Subject: [PATCH 1/2] 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. --- python/ucxx/ucxx/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/ucxx/ucxx/__init__.py b/python/ucxx/ucxx/__init__.py index 4f42d44a..0345b8e8 100644 --- a/python/ucxx/ucxx/__init__.py +++ b/python/ucxx/ucxx/__init__.py @@ -103,10 +103,13 @@ def _is_mig_device(handle): from ._version import __git_commit__, __version__ +__ucx_min_version__ = "1.15.0" __ucx_version__ = "%d.%d.%d" % get_ucx_version() -if get_ucx_version() < (1, 11, 1): +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`." ) From 922af3c8fe70ac48b993b85cee304d6872c5cd0f Mon Sep 17 00:00:00 2001 From: Peter Andreas Entschev Date: Mon, 16 Sep 2024 11:14:11 +0200 Subject: [PATCH 2/2] Remove redundant list cast Co-authored-by: Mads R. B. Kristensen --- python/ucxx/ucxx/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ucxx/ucxx/__init__.py b/python/ucxx/ucxx/__init__.py index 0345b8e8..fbb4c2d0 100644 --- a/python/ucxx/ucxx/__init__.py +++ b/python/ucxx/ucxx/__init__.py @@ -106,7 +106,7 @@ def _is_mig_device(handle): __ucx_min_version__ = "1.15.0" __ucx_version__ = "%d.%d.%d" % get_ucx_version() -if get_ucx_version() < tuple([int(i) for i in __ucx_min_version__.split(".")]): +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 " f"{__ucx_min_version__} or newer. If you believe the wrong version "