From db42b08736a6ac5cba7d18a0939aa37ec01bbe20 Mon Sep 17 00:00:00 2001 From: Amit Sharma Date: Sat, 28 Jun 2025 17:46:50 +0530 Subject: [PATCH 1/3] new version Signed-off-by: Amit Sharma --- docs/source/conf.py | 2 +- docs/source/dice_ml.explainer_interfaces.rst | 8 ++++++++ docs/source/dice_ml.model_interfaces.rst | 8 ++++++++ docs/update_docs.sh | 0 setup.py | 3 ++- 5 files changed, 19 insertions(+), 2 deletions(-) mode change 100644 => 100755 docs/update_docs.sh diff --git a/docs/source/conf.py b/docs/source/conf.py index 7f5adb7f..439e5326 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -22,7 +22,7 @@ author = 'Ramaravind, Amit, Chenhao' # The full version, including alpha/beta/rc tags -release = '0.11' +release = '0.12' # -- General configuration --------------------------------------------------- diff --git a/docs/source/dice_ml.explainer_interfaces.rst b/docs/source/dice_ml.explainer_interfaces.rst index f1dd2c79..e23b4fa0 100644 --- a/docs/source/dice_ml.explainer_interfaces.rst +++ b/docs/source/dice_ml.explainer_interfaces.rst @@ -52,6 +52,14 @@ dice\_ml.explainer\_interfaces.dice\_tensorflow2 module :undoc-members: :show-inheritance: +dice\_ml.explainer\_interfaces.dice\_xgboost module +--------------------------------------------------- + +.. automodule:: dice_ml.explainer_interfaces.dice_xgboost + :members: + :undoc-members: + :show-inheritance: + dice\_ml.explainer\_interfaces.explainer\_base module ----------------------------------------------------- diff --git a/docs/source/dice_ml.model_interfaces.rst b/docs/source/dice_ml.model_interfaces.rst index 6a8fc792..6472dd70 100644 --- a/docs/source/dice_ml.model_interfaces.rst +++ b/docs/source/dice_ml.model_interfaces.rst @@ -28,6 +28,14 @@ dice\_ml.model\_interfaces.pytorch\_model module :undoc-members: :show-inheritance: +dice\_ml.model\_interfaces.xgboost\_model module +------------------------------------------------ + +.. automodule:: dice_ml.model_interfaces.xgboost_model + :members: + :undoc-members: + :show-inheritance: + Module contents --------------- diff --git a/docs/update_docs.sh b/docs/update_docs.sh old mode 100644 new mode 100755 diff --git a/setup.py b/setup.py index edaba5f7..6ed735a0 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ import setuptools -VERSION_STR = "0.11" +VERSION_STR = "0.12" with open("README.rst", "r") as fh: long_description = fh.read() @@ -37,6 +37,7 @@ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], From 998295294af99502a4064467c39c6d47892b35a6 Mon Sep 17 00:00:00 2001 From: Amit Sharma Date: Sun, 13 Jul 2025 11:13:16 +0530 Subject: [PATCH 2/3] fixed ohe_min_max test error Signed-off-by: Amit Sharma --- tests/test_data.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_data.py b/tests/test_data.py index d562a5aa..5d51636d 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -1,3 +1,4 @@ +import numpy as np import pytest import dice_ml @@ -71,7 +72,7 @@ def test_ohe_min_max_transformed_query_instance(self, sample_adultincome_query): output_query = [0.068, 0.449, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0] d = self.d[0] - prepared_query = d.get_ohe_min_max_normalized_data(query_instance=sample_adultincome_query).iloc[0].tolist() + prepared_query = d.get_ohe_min_max_normalized_data(query_instance=sample_adultincome_query).iloc[0].to_numpy(dtype=np.float64) assert output_query == pytest.approx(prepared_query, abs=1e-3) def test_encoded_categorical_features(self): From 9d14da7a1e038d845388908867b44011b42da3ce Mon Sep 17 00:00:00 2001 From: Amit Sharma Date: Sun, 13 Jul 2025 12:35:22 +0530 Subject: [PATCH 3/3] fixed max lines issue Signed-off-by: Amit Sharma --- tests/test_data.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_data.py b/tests/test_data.py index 5d51636d..ce7ec199 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -72,7 +72,8 @@ def test_ohe_min_max_transformed_query_instance(self, sample_adultincome_query): output_query = [0.068, 0.449, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0] d = self.d[0] - prepared_query = d.get_ohe_min_max_normalized_data(query_instance=sample_adultincome_query).iloc[0].to_numpy(dtype=np.float64) + prepared_query = \ + d.get_ohe_min_max_normalized_data(query_instance=sample_adultincome_query).iloc[0].to_numpy(dtype=np.float64) assert output_query == pytest.approx(prepared_query, abs=1e-3) def test_encoded_categorical_features(self):