Skip to content

Commit

Permalink
Merge pull request #3 from SMTorg/dev
Browse files Browse the repository at this point in the history
update for compatibility with SMT 2.8
  • Loading branch information
Paul-Saves authored Nov 14, 2024
2 parents ecb42a5 + 77e35d8 commit 148a355
Show file tree
Hide file tree
Showing 14 changed files with 80 additions and 90 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
smt~=2.7.0
smt
scipy==1.10.1
matplotlib==3.7.5
pytest
Expand Down
39 changes: 17 additions & 22 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,38 +1,33 @@
from setuptools import setup
"""
Author: Mohammad Daffa Robani <[email protected]>
Paul Saves <[email protected]>
Remi Lafage <[email protected]>
Pramudita Satria Palar < [email protected]>
CLASSIFIERS = """\
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Programming Language :: C++
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: Implementation :: CPython
Topic :: Software Development
Topic :: Scientific/Engineering
Operating System :: Microsoft :: Windows
Operating System :: Unix
Operating System :: MacOS
This package is distributed under New BSD license.
"""

from setuptools import setup


# Import __version__ without importing the module in setup
exec(open("./smt_explainability/version.py").read())

metadata = dict(
name="smt-explainability",
version="0.1.0",
version=__version__, # noqa
description="",
long_description="",
author="Daffa Robani et al.",
author_email="[email protected]",
maintainer="Paul Saves",
maintainer_email="[email protected]",
license="BSD-3",
classifiers=[_f for _f in CLASSIFIERS.split("\n") if _f],
packages=["smt_explainability"],
install_requires=["smt~=2.7.0"],
install_requires=["smt>=2.8.0", "smt-design-space-ext>=0.3.0"],
extras_require={},
python_requires=">=3.8",
python_requires=">=3.9",
zip_safe=False,
# url="https://github.com/SMTorg/smt", # use the URL to the github repo
# download_url="https://github.com/SMTorg/smt/releases",
)

setup(**metadata)
4 changes: 2 additions & 2 deletions smt_explainability/pdp/tests/test_partial_dependence.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
)
from smt.sampling_methods import LHS
from smt.problems import WingWeight
from smt_ex.problems import MixedCantileverBeam
from smt_ex.pdp import partial_dependence
from smt_explainability.problems import MixedCantileverBeam
from smt_explainability.pdp import partial_dependence

import numpy as np
import unittest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from smt.problems import WingWeight
from smt.sampling_methods import LHS

from smt_ex.pdp import PartialDependenceDisplay
from smt_explainability.pdp import PartialDependenceDisplay

from smt.problems import MixedCantileverBeam
from smt.design_space import (
Expand Down
4 changes: 2 additions & 2 deletions smt_explainability/pdp/tests/test_pd_feature_importance.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
)
from smt.sampling_methods import LHS
from smt.problems import WingWeight
from smt_ex.problems import MixedCantileverBeam
from smt_ex.pdp import pd_feature_importance
from smt_explainability.problems import MixedCantileverBeam
from smt_explainability.pdp import pd_feature_importance

import unittest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from smt.problems import WingWeight
from smt.sampling_methods import LHS

from smt_ex.pdp import PDFeatureImportanceDisplay
from smt_explainability.pdp import PDFeatureImportanceDisplay

from smt.problems import MixedCantileverBeam
from smt.design_space import (
Expand Down
4 changes: 2 additions & 2 deletions smt_explainability/pdp/tests/test_pd_interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
)
from smt.sampling_methods import LHS
from smt.problems import WingWeight
from smt_ex.problems import MixedCantileverBeam
from smt_ex.pdp import pd_overall_interaction, pd_pairwise_interaction
from smt_explainability.problems import MixedCantileverBeam
from smt_explainability.pdp import pd_overall_interaction, pd_pairwise_interaction

import itertools
import unittest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from smt.problems import WingWeight
from smt.sampling_methods import LHS

from smt_ex.pdp import PDFeatureInteractionDisplay
from smt_explainability.pdp import PDFeatureInteractionDisplay

from smt.problems import MixedCantileverBeam
from smt.design_space import (
Expand Down
4 changes: 2 additions & 2 deletions smt_explainability/shap/tests/test_shap_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
)
from smt.sampling_methods import LHS
from smt.problems import WingWeight
from smt_ex.problems import MixedCantileverBeam
from smt_ex.shap import ShapDisplay
from smt_explainability.problems import MixedCantileverBeam
from smt_explainability.shap import ShapDisplay

import unittest

Expand Down
4 changes: 2 additions & 2 deletions smt_explainability/shap/tests/test_shap_feature_importance.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
)
from smt.sampling_methods import LHS
from smt.problems import WingWeight
from smt_ex.problems import MixedCantileverBeam
from smt_ex.shap import compute_shap_feature_importance
from smt_explainability.problems import MixedCantileverBeam
from smt_explainability.shap import compute_shap_feature_importance

import unittest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
)
from smt.sampling_methods import LHS
from smt.problems import WingWeight
from smt_ex.problems import MixedCantileverBeam
from smt_ex.shap import ShapFeatureImportanceDisplay
from smt_explainability.problems import MixedCantileverBeam
from smt_explainability.shap import ShapFeatureImportanceDisplay

import unittest

Expand Down
4 changes: 2 additions & 2 deletions smt_explainability/shap/tests/test_shap_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
)
from smt.sampling_methods import LHS
from smt.problems import WingWeight
from smt_ex.problems import MixedCantileverBeam
from smt_ex.shap import compute_shap_values
from smt_explainability.problems import MixedCantileverBeam
from smt_explainability.shap import compute_shap_values

import unittest

Expand Down
1 change: 1 addition & 0 deletions smt_explainability/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.2.0"
94 changes: 44 additions & 50 deletions tutorial/Explainability_tools.ipynb

Large diffs are not rendered by default.

0 comments on commit 148a355

Please sign in to comment.