Skip to content

Fix #182: Supporting private data for sklearn models #312

Merged
amit-sharma merged 24 commits intomasterfrom
amshar/support-private-data-for-sklearn-models
Oct 6, 2022
Merged

Fix #182: Supporting private data for sklearn models #312
amit-sharma merged 24 commits intomasterfrom
amshar/support-private-data-for-sklearn-models

Conversation

@amit-sharma
Copy link
Copy Markdown
Collaborator

@amit-sharma amit-sharma commented Jun 27, 2022

[READY FOR MERGE]

This PR adds support for private data interface for sklearn ML models. dice-kdtree is not supported since it requires access to the training data to output the counterfactuals.

@amit-sharma amit-sharma requested a review from gaugup as a code owner June 27, 2022 09:44
@amit-sharma amit-sharma changed the title Fix #182: Supporting private data for sklearn models [WIP] Fix #182: Supporting private data for sklearn models Jun 27, 2022
Signed-off-by: Amit Sharma <amit_sharma@live.com>
…t/dice into amshar/method-compat-with-dl-models

merging from github
Signed-off-by: Amit Sharma <amit_sharma@live.com>
Signed-off-by: Amit Sharma <amit_sharma@live.com>
Signed-off-by: Amit Sharma <amit_sharma@live.com>
Signed-off-by: Amit Sharma <amit_sharma@live.com>
Signed-off-by: Amit Sharma <amit_sharma@live.com>
Signed-off-by: Amit Sharma <amit_sharma@live.com>
Signed-off-by: Amit Sharma <amit_sharma@live.com>
Signed-off-by: Amit Sharma <amit_sharma@live.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 11, 2022

Unit Test Results

281 tests  +20   276 ✔️ +20   11m 26s ⏱️ +4s
    1 suites ±  0       5 💤 ±  0 
    1 files   ±  0       0 ±  0 

Results for commit b3f7fe2. ± Comparison against base commit 1651751.

This pull request removes 20 and adds 40 tests. Note that renamed tests count towards both.
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_features_to_vary[PYT-1-None-2-features_to_vary0-None]
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_features_to_vary[sklearn-1-None-2-features_to_vary0-None]
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_invalid_query_instance[PYT-features_to_vary0-permitted_range0-inverse_mad]
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_invalid_query_instance[sklearn-features_to_vary0-permitted_range0-inverse_mad]
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_no_cfs[PYT-7-None-3-all-None]
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_no_cfs[sklearn-7-None-3-all-None]
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_permitted_range_categorical[PYT-1-None-2-permitted_range0]
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_permitted_range_categorical[sklearn-1-None-2-permitted_range0]
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_random_counterfactual_explanations_output[PYT-0-1]
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_random_counterfactual_explanations_output[sklearn-0-1]
…
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_features_to_vary[random_binary_classification_exp_object0-1-None-2-features_to_vary0-None]
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_features_to_vary[random_binary_classification_exp_object1-1-None-2-features_to_vary0-None]
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_features_to_vary[random_binary_classification_exp_object2-1-None-2-features_to_vary0-None]
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_features_to_vary[random_binary_classification_exp_object3-1-None-2-features_to_vary0-None]
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_invalid_query_instance[random_binary_classification_exp_object0-features_to_vary0-permitted_range0-inverse_mad]
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_invalid_query_instance[random_binary_classification_exp_object1-features_to_vary0-permitted_range0-inverse_mad]
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_invalid_query_instance[random_binary_classification_exp_object2-features_to_vary0-permitted_range0-inverse_mad]
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_invalid_query_instance[random_binary_classification_exp_object3-features_to_vary0-permitted_range0-inverse_mad]
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_no_cfs[random_binary_classification_exp_object0-7-None-3-all-None]
tests.test_dice_interface.test_dice_random.TestDiceRandomBinaryClassificationMethods ‑ test_no_cfs[random_binary_classification_exp_object1-7-None-3-all-None]
…

♻️ This comment has been updated with latest results.

Signed-off-by: Amit Sharma <amit_sharma@live.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 11, 2022

Codecov Report

Attention: Patch coverage is 79.74684% with 16 lines in your changes missing coverage. Please review.

Project coverage is 71.99%. Comparing base (1651751) to head (b3f7fe2).

Files with missing lines Patch % Lines
dice_ml/utils/helpers.py 38.88% 11 Missing ⚠️
dice_ml/data_interfaces/private_data_interface.py 90.47% 4 Missing ⚠️
dice_ml/explainer_interfaces/dice_genetic.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #312      +/-   ##
==========================================
+ Coverage   71.86%   71.99%   +0.12%     
==========================================
  Files          26       26              
  Lines        3537     3596      +59     
==========================================
+ Hits         2542     2589      +47     
- Misses        995     1007      +12     
Flag Coverage Δ
unittests 71.99% <79.74%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@amit-sharma amit-sharma changed the title [WIP] Fix #182: Supporting private data for sklearn models Fix #182: Supporting private data for sklearn models Jul 11, 2022
Comment thread dice_ml/explainer_interfaces/dice_genetic.py Outdated
…dels

Signed-off-by: Amit Sharma <amit_sharma@live.com>
@amit-sharma amit-sharma merged commit 548dede into master Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants