Skip to content

Commit

Permalink
Update version error message (#277)
Browse files Browse the repository at this point in the history
Update version error message to match the minimum support UCX version and provide instructions to check where UCX is being loaded from.

Ported from rapidsai/ucx-py#1069

Authors:
  - Peter Andreas Entschev (https://github.com/pentschev)

Approvers:
  - Mads R. B. Kristensen (https://github.com/madsbk)

URL: #277
  • Loading branch information
pentschev authored Sep 16, 2024
1 parent bb30a22 commit 471130d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/ucxx/ucxx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`."
)

0 comments on commit 471130d

Please sign in to comment.