From 92cfe304ebedf6ad8a38d7fc51335fbaaf2b41e0 Mon Sep 17 00:00:00 2001 From: Avik Basu <3485425+ab93@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:04:40 -0800 Subject: [PATCH] fix: export SLearnerTuner from multilift.uplift and fix clone URL --- CHANGELOG.md | 4 ++++ CONTRIBUTING.md | 2 +- docs/api/uplift.rst | 2 +- multilift/uplift/__init__.py | 3 ++- tests/uplift/test_uplift_tuner.py | 9 +++++++++ 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6eafccc..31a1ed9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ All notable changes to this project are documented here. The format follows ## [Unreleased] +### Fixed + +- `SLearnerTuner` is now importable from `multilift.uplift`, matching `TLearnerTuner`. + ## [0.1.0] - Unreleased Initial open-source release. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a17dffe..2e9d7f2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,7 +20,7 @@ Open a GitHub issue with: This project uses [Poetry](https://python-poetry.org/). ```shell -git clone https://github.com//multilift.git +git clone https://github.com/intuit/multilift.git cd multilift make setup # poetry lock && poetry install --all-groups poetry run pre-commit install # optional, runs the linters on commit diff --git a/docs/api/uplift.rst b/docs/api/uplift.rst index 151e68d..a929866 100644 --- a/docs/api/uplift.rst +++ b/docs/api/uplift.rst @@ -50,7 +50,7 @@ TLearnerTuner SLearnerTuner ------------- -.. autoclass:: multilift.uplift.tuner.SLearnerTuner +.. autoclass:: multilift.uplift.SLearnerTuner :members: :show-inheritance: diff --git a/multilift/uplift/__init__.py b/multilift/uplift/__init__.py index 56412d1..d502cc9 100644 --- a/multilift/uplift/__init__.py +++ b/multilift/uplift/__init__.py @@ -3,9 +3,10 @@ from multilift.uplift.classifier import UpliftClassifierPipeline from multilift.uplift.eval import compute_best_uplift, compute_qini, compute_qini_auc from multilift.uplift.regressor import UpliftRegressorPipeline -from multilift.uplift.tuner import TLearnerTuner, TunerResult +from multilift.uplift.tuner import SLearnerTuner, TLearnerTuner, TunerResult __all__ = [ + "SLearnerTuner", "TLearnerTuner", "TunerResult", "UpliftClassifierPipeline", diff --git a/tests/uplift/test_uplift_tuner.py b/tests/uplift/test_uplift_tuner.py index 209c37d..0da2b3d 100644 --- a/tests/uplift/test_uplift_tuner.py +++ b/tests/uplift/test_uplift_tuner.py @@ -1060,3 +1060,12 @@ def test_top_decile_scorer_returns_float(self, sample_data): ) assert isinstance(score, float) + + +class TestPublicExports: + @pytest.mark.parametrize("tuner_cls", [SLearnerTuner, TLearnerTuner, TunerResult]) + def test_tuner_classes_exported_from_uplift(self, tuner_cls): + import multilift.uplift + + assert getattr(multilift.uplift, tuner_cls.__name__) is tuner_cls + assert tuner_cls.__name__ in multilift.uplift.__all__