Skip to content

Commit

Permalink
Removed Explainer tesitng from optimizer tests, moved to Campaign
Browse files Browse the repository at this point in the history
  • Loading branch information
kstone40 committed Aug 13, 2024
1 parent 8b4c1ec commit 0ac92ca
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Fixed SHAP explainer analysis and visualization functions
- Changed SHAP visualization colors to use obsidian branding
- Moved sensitivity method from campaign.analysis to campaign.explainer
- Moved Explainer testing from optimizer pytests to campaign pytests

### Removed
- Removed code chunks regarding unused optional inputs to PDP ICE function imported from SHAP GitHub
Expand Down
10 changes: 1 addition & 9 deletions obsidian/tests/test_optimizer_MOO.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
from obsidian.constraints import OutConstraint_Blank, InConstraint_Generic, InConstraint_ConstantDim
from obsidian.objectives import Identity_Objective, Index_Objective, Utopian_Distance, Objective_Sequence, Bounded_Target, \
Scalar_WeightedSum, Scalar_WeightedNorm, Scalar_Chebyshev
from obsidian.campaign.explainer import Explainer


import pandas as pd
import numpy as np
import pytest
Expand Down Expand Up @@ -162,12 +161,5 @@ def test_objective(m_batch, obj):
df_suggest = pd.concat([X_suggest, eval_suggest], axis=1)


@pytest.mark.fast
def test_explain():
model_exp = Explainer(optimizer)
model_exp.shap_explain(responseid=1, n=10)
df_sens = model_exp.cal_sensitivity(dx=0.01)


if __name__ == '__main__':
pytest.main([__file__, '-m', 'not slow'])
8 changes: 0 additions & 8 deletions obsidian/tests/test_optimizer_SOO.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from obsidian.constraints import OutConstraint_Blank, InConstraint_Generic, InConstraint_ConstantDim, OutConstraint_L1
from obsidian.objectives import Identity_Objective, Feature_Objective, Objective_Sequence, Utopian_Distance, Bounded_Target
from obsidian.tests.utils import approx_equal
from obsidian.campaign.explainer import Explainer

import pandas as pd
import numpy as np
Expand Down Expand Up @@ -169,12 +168,5 @@ def test_objective(m_batch, obj):
df_suggest = pd.concat([X_suggest, eval_suggest], axis=1)


@pytest.mark.fast
def test_explain():
model_exp = Explainer(optimizer)
model_exp.shap_explain(n=10)
df_sens = model_exp.cal_sensitivity(dx=0.01)


if __name__ == '__main__':
pytest.main([__file__, '-m', 'not slow'])

0 comments on commit 0ac92ca

Please sign in to comment.