Skip to content

Commit

Permalink
Merge pull request #378 from BCG-X-Official/dev/2.1.1
Browse files Browse the repository at this point in the history
BUILD: Release FACET 2.1.1
  • Loading branch information
j-ittner committed Nov 15, 2023
2 parents 70f757f + 290864b commit 66bea15
Show file tree
Hide file tree
Showing 20 changed files with 108 additions and 92 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 22.8.0
rev: 23.10.1
hooks:
- id: black
language: python
Expand Down Expand Up @@ -41,6 +41,6 @@ repos:
language: python
language_version: python39
additional_dependencies:
- numpy~=1.22
- numpy~=1.24
- gamma-pytools~=2.1
- sklearndf~=2.2
35 changes: 11 additions & 24 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
.. image:: sphinx/source/_images/Gamma_Facet_Logo_RGB_LB.svg

.. note:: **FACET 2.0 now available!**

FACET 2.0 brings numerous API enhancements and improvements, accelerates model
inspection by up to a factor of 50 in many practical applications, introduces a new,
more flexible and user-friendly API for hyperparameter tuning – with support for
`scikit-learn`'s native hyperparameter searchers – and improves the styling of all
visualizations.

See the `release notes <https://bcg-gamma.github.io/facet/docs-version/2-0/_generated/release_notes.html>`__
for more details.



FACET is an open source library for human-explainable AI.
It combines sophisticated model inspection and model-based simulation to enable better
explanations of your supervised machine learning models.
Expand Down Expand Up @@ -49,8 +36,8 @@ FACET is composed of the following key components:
| | tried and tested pipelining paradigm with new capabilities for model |
| | selection, inspection, and simulation. |
| | FACET also introduces |
| | `sklearndf <https://github.com/BCG-Gamma/sklearndf>`__ |
| | [`documentation <https://bcg-gamma.github.io/sklearndf/index.html>`__]|
| | `sklearndf <https://github.com/BCG-X-Official/sklearndf>`__ |
| | [`documentation <https://bcg-x-official.github.io/sklearndf/index.html>`__]|
| | an augmented version of *scikit-learn* with enhanced support for |
| | *pandas* data frames that ensures end-to-end traceability of features.|
+-----------------+-----------------------------------------------------------------------+
Expand Down Expand Up @@ -107,10 +94,10 @@ Quickstart
The following quickstart guide provides a minimal example workflow to get you
up and running with FACET.
For additional tutorials and the API reference,
see the `FACET documentation <https://bcg-gamma.github.io/facet/docs-version/2-0>`__.
see the `FACET documentation <https://bcg-x-official.github.io/facet/docs-version/2-0>`__.

Changes and additions to new versions are summarized in the
`release notes <https://bcg-gamma.github.io/facet/docs-version/2-0/release_notes.html>`__.
`release notes <https://bcg-x-official.github.io/facet/docs-version/2-0/release_notes.html>`__.


Enhanced Machine Learning Workflow
Expand Down Expand Up @@ -349,7 +336,7 @@ removing `TCH`, and one of `TC` or `LDL` to further simplify the model and obtai
reduced set of independent features.

Please see the
`API reference <https://bcg-gamma.github.io/facet/apidoc/facet.html>`__
`API reference <https://bcg-x-official.github.io/facet/apidoc/facet.html>`__
for more detail.


Expand Down Expand Up @@ -412,21 +399,21 @@ FACET is stable and is being supported long-term.

Contributions to FACET are welcome and appreciated.
For any bug reports or feature requests/enhancements please use the appropriate
`GitHub form <https://github.com/BCG-Gamma/facet/issues>`_, and if you wish to do so,
`GitHub form <https://github.com/BCG-X-Official/facet/issues>`_, and if you wish to do so,
please open a PR addressing the issue.

We do ask that for any major changes please discuss these with us first via an issue or
using our team email: FacetTeam@bcg.com.

For further information on contributing please see our
`contribution guide <https://bcg-gamma.github.io/facet/contribution_guide.html>`__.
`contribution guide <https://bcg-x-official.github.io/facet/contribution_guide.html>`__.


License
-------

FACET is licensed under Apache 2.0 as described in the
`LICENSE <https://github.com/BCG-Gamma/facet/blob/develop/LICENSE>`_ file.
`LICENSE <https://github.com/BCG-X-Official/facet/blob/develop/LICENSE>`_ file.


Acknowledgements
Expand All @@ -446,7 +433,7 @@ BCG GAMMA
---------

If you would like to know more about the team behind FACET please see the
`about us <https://bcg-gamma.github.io/facet/about_us.html>`__ page.
`about us <https://bcg-x-official.github.io/facet/about_us.html>`__ page.

We are always on the lookout for passionate and talented data scientists to join the
BCG GAMMA team. If you would like to know more you can find out about
Expand Down Expand Up @@ -476,7 +463,7 @@ or have a look at
.. |pypi| image:: https://badge.fury.io/py/gamma-facet.svg
:target: https://pypi.org/project/gamma-facet/

.. |azure_build| image:: https://dev.azure.com/gamma-facet/facet/_apis/build/status/BCG-Gamma.facet?repoName=BCG-Gamma%2Ffacet&branchName=develop
.. |azure_build| image:: https://dev.azure.com/gamma-facet/facet/_apis/build/status/BCG-X-Official.facet?repoName=BCG-X-Official%2Ffacet&branchName=develop
:target: https://dev.azure.com/gamma-facet/facet/_build?definitionId=7&_a=summary

.. |azure_code_cov| image:: https://img.shields.io/azure-devops/coverage/gamma-facet/facet/7/2.0.x
Expand All @@ -489,7 +476,7 @@ or have a look at
:target: https://github.com/psf/black

.. |made_with_sphinx_doc| image:: https://img.shields.io/badge/Made%20with-Sphinx-1f425f.svg
:target: https://bcg-gamma.github.io/facet/index.html
:target: https://bcg-x-official.github.io/facet/index.html

.. |license_badge| image:: https://img.shields.io/badge/License-Apache%202.0-olivegreen.svg
:target: https://opensource.org/licenses/Apache-2.0
Expand Down
8 changes: 8 additions & 0 deletions RELEASE_NOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ We still recommend using :mod:`sklearndf` models and learner pipelines along wit
:class:`.NativeLearnerInspector` can be useful for inspecting models that have been
trained using *scikit-learn* directly.

2.1.1
~~~~~

This is a maintenance release to catch up with FACET |nbsp| 2.0.1.


2.1.0
~~~~~

Expand Down Expand Up @@ -44,6 +50,8 @@ fully type-checked by |mypy|.
and classifiers; it is no longer necessary to wrap them into a
:class:`.RegressorPipelineDF` or :class:`.ClassifierPipelineDF` instance with empty
preprocessing
- FIX: replace a call to method ``get_text_heights()`` of :class:`matplotlib.axes.Axes`,
which is deprecated as of :mod:`matplotlib` |nbsp| 3.6


2.0.0
Expand Down
8 changes: 5 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ resources:
repositories:
- repository: pytools
type: github
endpoint: BCG-Gamma
name: BCG-Gamma/pytools
endpoint: BCG-X-Official
name: BCG-X-Official/pytools
ref: 2.1.x

variables:
Expand Down Expand Up @@ -65,7 +65,7 @@ stages:
versionSpec: '3.9'
displayName: 'use Python 3.9'
- script: |
python -m pip install black~=22.8
python -m pip install black~=23.10.1
python -m black --check .
displayName: 'Run black'
- job:
Expand Down Expand Up @@ -655,6 +655,7 @@ stages:
cd $(System.DefaultWorkingDirectory)
echo "Checking out github-pages"
git fetch origin github-pages --depth=1
git checkout --track origin/github-pages
# make sure we have a docs directory
Expand All @@ -676,6 +677,7 @@ stages:
cd $(System.DefaultWorkingDirectory)
echo "Checking out $(branchName)"
git fetch origin $(branchName) --depth=1
git checkout $(branchName)
# install micromamba
Expand Down
8 changes: 4 additions & 4 deletions condabuild/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ test:
- pytest -vs test

about:
home: https://github.com/BCG-Gamma/facet
home: https://github.com/BCG-X-Official/facet
license: Apache Software License v2.0
license_file: LICENSE
description: |
FACET is an open source library for human-explainable AI. It combines sophisticated
model inspection and model-based simulation to enable better explanations of
your supervised machine learning models.
dev_url: https://github.com/BCG-Gamma/facet
doc_url: https://bcg-gamma.github.io/facet/
doc_source_url: https://github.com/BCG-Gamma/facet/blob/develop/README.rst
dev_url: https://github.com/BCG-X-Official/facet
doc_url: https://bcg-x-official.github.io/facet/
doc_source_url: https://github.com/BCG-X-Official/facet/blob/develop/README.rst
21 changes: 11 additions & 10 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ channels:
dependencies:
# run
- gamma-pytools ~= 2.1
- joblib ~= 1.2
- joblib ~= 1.3
- lightgbm ~= 3.3
- matplotlib ~= 3.7
- numpy ~= 1.24
- matplotlib ~= 3.8
- numpy ~= 1.26
- pandas ~= 2.0
- python ~= 3.9
- scikit-learn ~= 1.2.0
- scipy ~= 1.10
- shap ~= 0.41
- python ~= 3.11
- scikit-learn ~= 1.2.2
- scipy ~= 1.11
- shap ~= 0.43
- sklearndf ~= 2.2
- typing_extensions ~= 4.3
- typing_extensions ~= 4.6
- xlrd ~= 2.0
# additional packages for notebooks etc.
- pip ~= 23.0
- pip:
Expand All @@ -30,7 +31,7 @@ dependencies:
- pydata-sphinx-theme ~= 0.8.1
# notebooks
- ipywidgets ~= 8.0
- jupyterlab ~= 3.5
- jupyterlab ~= 4.0
- openpyxl ~= 3.0
- seaborn ~= 0.12
- tableone ~= 0.7
- tableone ~= 0.8
6 changes: 3 additions & 3 deletions pypi_description.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ workflow, enhancing
tried and tested pipelining paradigm with new capabilities for model
selection, inspection, and simulation.
FACET also introduces
`sklearndf <https://github.com/BCG-Gamma/sklearndf>`__, an augmented
`sklearndf <https://github.com/BCG-X-Official/sklearndf>`__, an augmented
version of *scikit-learn* with enhanced support for *pandas* data
frames that ensures end-to-end traceability of features.

Expand All @@ -51,7 +51,7 @@ License
---------------------------

FACET is licensed under Apache 2.0 as described in the
`LICENSE <https://github.com/BCG-Gamma/facet/blob/develop/LICENSE>`_ file.
`LICENSE <https://github.com/BCG-X-Official/facet/blob/develop/LICENSE>`_ file.

.. Begin-Badges
Expand All @@ -68,7 +68,7 @@ FACET is licensed under Apache 2.0 as described in the
:target: https://github.com/psf/black

.. |made_with_sphinx_doc| image:: https://img.shields.io/badge/Made%20with-Sphinx-1f425f.svg
:target: https://bcg-gamma.github.io/facet/index.html
:target: https://bcg-x-official.github.io/facet/index.html

.. |license_badge| image:: https://img.shields.io/badge/License-Apache%202.0-olivegreen.svg
:target: https://opensource.org/licenses/Apache-2.0
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exclude = [".idea", "tmp", "dist", ".tox", ".pytest_cache"]
[tool.flit.metadata]
module = "facet"
author = "Boston Consulting Group (BCG)"
home-page = "https://github.com/BCG-Gamma/facet"
home-page = "https://github.com/BCG-X-Official/facet"
description-file = "pypi_description.rst"
dist-name = "gamma-facet"
license = "Apache Software License v2.0"
Expand Down Expand Up @@ -64,8 +64,8 @@ docs = [
]

[tool.flit.metadata.urls]
Documentation = "https://bcg-gamma.github.io/facet/"
Repository = "https://github.com/BCG-Gamma/facet"
Documentation = "https://bcg-x-official.github.io/facet/"
Repository = "https://github.com/BCG-X-Official/facet"

[build]
# comma-separated list of packages to be built from source in pip min builds
Expand Down
2 changes: 1 addition & 1 deletion sphinx/auxiliary/Diabetes_getting_started_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
" \n",
"- **Enhanced Machine Learning Workflow** \n",
"\n",
" FACET offers an efficient and transparent machine learning workflow, enhancing [scikit-learn]( https://scikit-learn.org/stable/index.html)'s tried and tested pipelining paradigm with new capabilities for model selection, inspection, and simulation. FACET also introduces [sklearndf](https://github.com/BCG-Gamma/sklearndf), an augmented version of *scikit-learn* with enhanced support for *pandas* dataframes that ensures end-to-end traceability of features. "
" FACET offers an efficient and transparent machine learning workflow, enhancing [scikit-learn]( https://scikit-learn.org/stable/index.html)'s tried and tested pipelining paradigm with new capabilities for model selection, inspection, and simulation. FACET also introduces [sklearndf](https://github.com/BCG-X-Official/sklearndf), an augmented version of *scikit-learn* with enhanced support for *pandas* dataframes that ensures end-to-end traceability of features. "
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions sphinx/auxiliary/Facet_sphinx_tutorial_template.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
" \n",
"- **Enhanced Machine Learning Workflow** \n",
"\n",
" FACET offers an efficient and transparent machine learning workflow, enhancing [scikit-learn]( https://scikit-learn.org/stable/index.html)'s tried and tested pipelining paradigm with new capabilities for model selection, inspection, and simulation. FACET also introduces [sklearndf](https://github.com/BCG-Gamma/sklearndf), an augmented version of *scikit-learn* with enhanced support for *pandas* dataframes that ensures end-to-end traceability of features. \n",
" FACET offers an efficient and transparent machine learning workflow, enhancing [scikit-learn]( https://scikit-learn.org/stable/index.html)'s tried and tested pipelining paradigm with new capabilities for model selection, inspection, and simulation. FACET also introduces [sklearndf](https://github.com/BCG-X-Official/sklearndf), an augmented version of *scikit-learn* with enhanced support for *pandas* dataframes that ensures end-to-end traceability of features. \n",
"\n",
"***\n",
"\n",
Expand Down Expand Up @@ -86,7 +86,7 @@
"\n",
"1. Common packages (pandas, matplotlib, etc.)\n",
"2. Required FACET classes (inspection, selection, validation, simulation, etc.)\n",
"3. Other BCG Gamma packages which simplify pipelining (sklearndf, see on [GitHub](https://github.com/orgs/BCG-Gamma/sklearndf/)) and support visualization (pytools, see on [GitHub](https://github.com/BCG-Gamma/pytools)) when using FACET"
"3. Other BCG Gamma packages which simplify pipelining (sklearndf, see on [GitHub](https://github.com/orgs/BCG-X-Official/sklearndf/)) and support visualization (pytools, see on [GitHub](https://github.com/BCG-X-Official/pytools)) when using FACET"
]
},
{
Expand Down Expand Up @@ -128,7 +128,7 @@
"source": [
"**sklearndf imports**\n",
"\n",
"Instead of using the \"regular\" scikit-learn package, we are going to use sklearndf (see on [GitHub](https://github.com/orgs/BCG-Gamma/sklearndf/)). sklearndf is an open source library designed to address a common issue with scikit-learn: the outputs of transformers are numpy arrays, even when the input is a data frame. However, to inspect a model it is essential to keep track of the feature names. sklearndf retains all the functionality available through scikit-learn plus the feature traceability and usability associated with Pandas data frames. Additionally, the names of all your favourite scikit-learn functions are the same except for `DF` on the end. For example, the standard scikit-learn import:\n",
"Instead of using the \"regular\" scikit-learn package, we are going to use sklearndf (see on [GitHub](https://github.com/orgs/BCG-X-Official/sklearndf/)). sklearndf is an open source library designed to address a common issue with scikit-learn: the outputs of transformers are numpy arrays, even when the input is a data frame. However, to inspect a model it is essential to keep track of the feature names. sklearndf retains all the functionality available through scikit-learn plus the feature traceability and usability associated with Pandas data frames. Additionally, the names of all your favourite scikit-learn functions are the same except for `DF` on the end. For example, the standard scikit-learn import:\n",
"\n",
"`from sklearn.pipeline import Pipeline`\n",
"\n",
Expand All @@ -152,7 +152,7 @@
"source": [
"**pytools imports**\n",
"\n",
"pytools (see on [GitHub](https://github.com/BCG-Gamma/pytools)) is an open source library containing general machine learning and visualization utilities, some of which are useful for visualising the advanced model inspection capabilities of FACET."
"pytools (see on [GitHub](https://github.com/BCG-X-Official/pytools)) is an open source library containing general machine learning and visualization utilities, some of which are useful for visualising the advanced model inspection capabilities of FACET."
]
},
{
Expand Down
3 changes: 1 addition & 2 deletions sphinx/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@


if __name__ == "__main__":

# noinspection PyUnusedLocal
def run_make(branch: str, working_directory: str) -> None:
"""Stub, overwritten by bootstrap.py"""

# run the common make file available in the pytools repo
with request.urlopen(
f"https://raw.githubusercontent.com/BCG-Gamma/pytools/{BRANCH}"
f"https://raw.githubusercontent.com/BCG-X-Official/pytools/{BRANCH}"
f"/sphinx/base/bootstrap.py"
) as response:
exec(response.read().decode("utf-8"), globals())
Expand Down
4 changes: 2 additions & 2 deletions sphinx/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
project="facet",
html_logo=os.path.join("_images", "Gamma_Facet_Logo_RGB_LB.svg"),
intersphinx_mapping={
"pytools": ("https://bcg-gamma.github.io/pytools/", None),
"pytools": ("https://bcg-x-official.github.io/pytools/", None),
"shap": ("https://shap.readthedocs.io/en/stable", None),
"sklearn": ("https://scikit-learn.org/stable", None),
"sklearndf": ("https://bcg-gamma.github.io/sklearndf/", None),
"sklearndf": ("https://bcg-x-official.github.io/sklearndf/", None),
},
)
4 changes: 2 additions & 2 deletions sphinx/source/contribution_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ The ``sphinx/source`` folder contains:


The two key scripts are ``make.py`` and ``conf.py``. The base configuration for the
these scripts can be found in `pytools/sphinx <https://github.com/BCG-Gamma/pytools/tree/develop/sphinx/base>`_.
these scripts can be found in `pytools/sphinx <https://github.com/BCG-X-Official/pytools/tree/develop/sphinx/base>`_.
The reason for this is to minimise code given the standardization of the documentation
build across multiple packages.

Expand Down Expand Up @@ -452,7 +452,7 @@ The build process for the PyPI and conda distributions uses the following key
files:

- ``make.py``: generic Python script for package builds. Most configuration is imported
from pytools `make.py <https://github.com/BCG-Gamma/pytools/blob/develop/make.py>`__
from pytools `make.py <https://github.com/BCG-X-Official/pytools/blob/develop/make.py>`__
which is a build script that wraps the package build, as well as exposing the matrix
dependency definitions specified in the ``pyproject.toml`` as environment variables
- ``pyproject.toml``: metadata for PyPI, build settings and package dependencies
Expand Down
2 changes: 1 addition & 1 deletion sphinx/source/faqs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on `stackoverflow <https://stackoverflow.com/>`_.
1. **What if I find a bug or have an idea for a new feature?**

For bug reports or feature requests please use our
`GitHub issue tracker <https://github.com/BCG-Gamma/facet/issues>`_.
`GitHub issue tracker <https://github.com/BCG-X-Official/facet/issues>`_.
For any other enquiries please feel free to contact us at FacetTeam@bcg.com.

2. **How does FACET's novel algorithm calculate pairwise feature redundancy and synergy?**
Expand Down
Loading

0 comments on commit 66bea15

Please sign in to comment.