Skip to content

Commit

Permalink
added back the dash components to the installation since some version…
Browse files Browse the repository at this point in the history
…s of dash still require them, and updated the changelog for the v0.3.1 release
  • Loading branch information
paulbkoch committed Mar 14, 2023
1 parent 0b22c1d commit b2365e7
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and the versioning is mostly derived from [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v0.3.1] - 2023-03-13
### Added
- Mac m1 support in conda-forge
- SPOTGreedy prototype selection (PR #392)
### Fixed
- fix visualization when both cloud and non-cloud environments are detected (PR #210)
- fix ShapTree bug where it was treating classifiers as regressors
- resolve scikit-learn warnings occurring when models were trained using Pandas DataFrames
- change the defaults to prefer 'continuous' over 'nominal' when a feature has 1 or 2 unique float64 values
### Breaking Changes
- in the blackbox and greybox explainers, change from accepting a predict_fn to
accepting either a model or a predict_fn
- feature type 'categorical' has been renamed to 'nominal' for the remaining
feature_type parameters in the package (EBMs were already using 'nominal')
- removed the unused sampler parameters to the Explainer classes

## [v0.3.0] - 2022-11-16
### Added
- Full Complexity EBMs with higher order interactions supported: GA3M, GA4M, GA5M, etc...
Expand Down
20 changes: 15 additions & 5 deletions python/interpret-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@
"treeinterpreter": ["treeinterpreter>=0.2.2"],
# Dash
"dash": [
# dash 2.* removed the dependencies on: dash-html-components, dash-core-components, dash-table
"dash>=1.0.0",
"dash-core-components>=1.0.0", # dash 2.* removes the need for this dependency
"dash-html-components>=1.0.0", # dash 2.* removes the need for this dependency
"dash-table>=4.1.0", # dash 2.* removes the need for this dependency
"dash-cytoscape>=0.1.1",
"gevent>=1.3.6",
"requests>=2.19.0",
Expand Down Expand Up @@ -129,6 +133,7 @@ def _copy_native_code_to_setup():
"Shared directory in symbolic not found. This should be configured either by setup.py or alternative build processes."
)


def build_libebm():
script_path = os.path.dirname(os.path.abspath(__file__))
sym_path = os.path.join(script_path, "symbolic")
Expand All @@ -141,9 +146,7 @@ def build_libebm():
build_script = os.path.join(sym_path, "build.sh")
subprocess.check_call(["/bin/sh", build_script], cwd=sym_path)

source_dir = os.path.join(
sym_path, "python", "interpret-core", "interpret", "lib"
)
source_dir = os.path.join(sym_path, "python", "interpret-core", "interpret", "lib")
target_dir = os.path.join(script_path, "interpret", "lib")
os.makedirs(target_dir, exist_ok=True)
file_names = os.listdir(source_dir)
Expand All @@ -152,6 +155,7 @@ def build_libebm():
os.path.join(source_dir, file_name), os.path.join(target_dir, file_name)
)


def build_vis():
script_path = os.path.dirname(os.path.abspath(__file__))

Expand All @@ -160,10 +164,13 @@ def build_vis():
subprocess.run("npm install && npm run build-prod", cwd=js_path, shell=True)

js_bundle_src = os.path.join(js_path, "dist", "interpret-inline.js")
js_bundle_dest = os.path.join(script_path, "interpret", "lib", "interpret-inline.js")
js_bundle_dest = os.path.join(
script_path, "interpret", "lib", "interpret-inline.js"
)
os.makedirs(os.path.dirname(js_bundle_dest), exist_ok=True)
shutil.copyfile(js_bundle_src, js_bundle_dest)


class BuildCommand(build):
def run(self):
# when making a wheel we depend on a cloud build platform to make the various OS and platform
Expand All @@ -180,7 +187,9 @@ def run(self):
# this should only be triggered in an sdist
build_libebm()

js_bundle_dest = os.path.join(script_path, "interpret", "lib", "interpret-inline.js")
js_bundle_dest = os.path.join(
script_path, "interpret", "lib", "interpret-inline.js"
)
if not os.path.exists(js_bundle_dest):
# this will trigger from github source or during conda building
# but it wil not trigger on bdist or sdist build in azure-pipelines since the js file will exist
Expand All @@ -202,6 +211,7 @@ def run(self):
build_vis()
sdist.run(self)


setup(
name=name,
version=version,
Expand Down

0 comments on commit b2365e7

Please sign in to comment.