From 2a50fe902c7aaf47f0a2aad991ab51c6e7a079a7 Mon Sep 17 00:00:00 2001 From: Alejandro Moreo Date: Tue, 8 Sep 2026 14:47:13 +0200 Subject: [PATCH] Fix broken imports left over from the BBSE/LEIP commit quapy/classification/__init__.py imported a labelshift module that doesn't exist anywhere in the repo (and nothing else references it), breaking `import quapy` entirely; the import is removed. quapy/method/aggregative.py imported a nonexistent `_liep` module instead of the actual file, _liep_draft.py, which itself never got a LEIP class added (only helper functions such as leip()). Guards the import so LEIP degrades to an "not available" placeholder, like the other optional neural methods, instead of crashing the whole package. test_leip/test_leip_fixed_tau still fail as a result; finishing LEIP is left for a follow-up. Co-Authored-By: Claude Sonnet 5 --- quapy/classification/__init__.py | 1 - quapy/method/aggregative.py | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/quapy/classification/__init__.py b/quapy/classification/__init__.py index 33551b7..b63e0eb 100644 --- a/quapy/classification/__init__.py +++ b/quapy/classification/__init__.py @@ -1,4 +1,3 @@ from . import calibration -from . import labelshift from . import methods from . import svmperf diff --git a/quapy/method/aggregative.py b/quapy/method/aggregative.py index 23341b6..1decb39 100644 --- a/quapy/method/aggregative.py +++ b/quapy/method/aggregative.py @@ -2218,9 +2218,11 @@ KDEyML = _kdey.KDEyML KDEyHD = _kdey.KDEyHD KDEyCS = _kdey.KDEyCS -from . import _liep - -LEIP = _liep.LEIP +try: + from . import _liep_draft as _liep + LEIP = _liep.LEIP +except AttributeError: + LEIP = "LEIP is not available (incomplete implementation in _liep_draft.py)" # ---------------------------------------------------------------