Skip to content

Commit

Permalink
Merge pull request #377 from BCG-X-Official/dev/2.0.1
Browse files Browse the repository at this point in the history
BUILD: release FACET 2.0.1
  • Loading branch information
j-ittner authored Nov 14, 2023
2 parents bd02c4c + 093eafc commit 0948ac8
Show file tree
Hide file tree
Showing 31 changed files with 192 additions and 138 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
24 changes: 12 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
`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>`__
See the `release notes <https://bcg-x-official.github.io/facet/docs-version/2-0/_generated/release_notes.html>`__
for more details.


Expand Down Expand Up @@ -49,8 +49,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 +107,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 +349,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 +412,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 +446,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 +476,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 +489,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
10 changes: 10 additions & 0 deletions RELEASE_NOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ visualizations.
FACET 2.0 requires :mod:`pytools` |nbsp| 2.0 and :mod:`sklearndf` |nbsp| 2.2, and is now
fully type-checked by |mypy|.

2.0.1
~~~~~

- API: class :class:`.LearnerInspector` now supports inspecting individual regressors
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
40 changes: 33 additions & 7 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 @@ -243,7 +243,15 @@ stages:
- script: dir $(Build.SourcesDirectory)

- script: |
conda install -y -c anaconda conda-build~=3.21 conda-verify~=3.4 toml~=0.10 flit~=3.6 packaging~=20.9
# install micromamba
curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
export MAMBA_ROOT_PREFIX=~/micromamba
eval "$(./bin/micromamba shell hook -s posix)"
# create and activate a build environment, then install the tools we need
micromamba create -n build
micromamba activate build
micromamba install -y -c conda-forge boa~=0.14 toml~=0.10 flit~=3.6 packaging~=20.9
displayName: 'Install conda-build, flit, toml'
condition: eq(variables['BUILD_SYSTEM'], 'conda')
Expand All @@ -261,7 +269,11 @@ stages:
targetType: 'inline'
script: |
set -eux
if [ "$BUILD_SYSTEM" = "conda" ] ; then eval "$(conda shell.bash hook)" ; fi
if [ "$BUILD_SYSTEM" = "conda" ] ; then
export MAMBA_ROOT_PREFIX=~/micromamba
eval "$(./bin/micromamba shell hook -s posix)"
micromamba activate build
fi
export RUN_PACKAGE_VERSION_TEST=$(project_name)
cd $(Build.SourcesDirectory)/$(project_root)
Expand Down Expand Up @@ -330,7 +342,15 @@ stages:
- script: dir $(Build.SourcesDirectory)

- script: |
conda install -y -c anaconda conda-build~=3.21 conda-verify~=3.4 toml~=0.10 flit~=3.6 packaging~=20.9
# install micromamba
curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
export MAMBA_ROOT_PREFIX=~/micromamba
eval "$(./bin/micromamba shell hook -s posix)"
# create and activate a build environment, then install the tools we need
micromamba create -n build
micromamba activate build
micromamba install -y -c conda-forge boa~=0.14 toml~=0.10 flit~=3.6 packaging~=20.9
displayName: 'Install conda-build, flit, toml'
condition: eq(variables['BUILD_SYSTEM'], 'conda')
Expand All @@ -348,7 +368,11 @@ stages:
targetType: 'inline'
script: |
set -eux
if [ "$BUILD_SYSTEM" = "conda" ] ; then eval "$(conda shell.bash hook)" ; fi
if [ "$BUILD_SYSTEM" = "conda" ] ; then
export MAMBA_ROOT_PREFIX=~/micromamba
eval "$(./bin/micromamba shell hook -s posix)"
micromamba activate build
fi
export RUN_PACKAGE_VERSION_TEST=$(project_name)
cd $(Build.SourcesDirectory)/$(project_root)
Expand Down Expand Up @@ -631,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 @@ -652,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 @@ -56,13 +56,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
45 changes: 18 additions & 27 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,34 @@ channels:
- bcg_gamma
dependencies:
# run
- boruta_py ~= 0.3
- gamma-pytools ~= 2.1
- joblib ~= 1.2
- joblib ~= 1.3
- lightgbm ~= 3.3
- matplotlib ~= 3.7
- numpy ~= 1.23
- 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
# build/test
- conda-build ~= 3.23.3
- conda-verify ~= 3.1.1
- docutils ~= 0.17.1
- flit ~= 3.8.0
- jinja2 ~= 2.11.3
- markupsafe ~= 2.0.1 # markupsafe 2.1 breaks support for jinja2
- m2r ~= 0.3.1
- pluggy ~= 0.13.1
- pre-commit ~= 2.21.0
- pytest ~= 7.2.1
- pytest-cov ~= 2.12.1
- pyyaml ~= 5.4.1
- toml ~= 0.10.2
- tox ~= 3.27.1
- yaml ~= 0.2.5
- typing_extensions ~= 4.6
- xlrd ~= 2.0
# additional packages for notebooks etc.
- pip ~= 23.0
- pip:
- arfs ~= 1.1
# test
- pytest ~= 7.2.1
- pytest-cov ~= 2.12.1
# sphinx
- nbsphinx ~= 0.8.9
- sphinx ~= 4.5.0
- sphinx-autodoc-typehints ~= 1.19.2
- 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 @@ -63,8 +63,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
Loading

0 comments on commit 0948ac8

Please sign in to comment.