Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/python 3.10 #33

Merged
merged 5 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
max-parallel: 1
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -28,12 +28,12 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
python -m pytest
- name: Build python package
run: |
python setup.py sdist bdist_wheel
- name: Deploy to PyPI
if: success() && startsWith(github.ref, 'refs/tags') && matrix.python-version == 3.9
if: success() && startsWith(github.ref, 'refs/tags') && matrix.python-version == '3.10'
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
Expand Down
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
·
<a href="https://medium.com/oss-by-maif/eurybia-maif-releases-a-new-open-source-solution-for-quality-ia-models-in-production-57bd0266a77e">Eurybia Quick Tour</a>
·
<a href="https://www.kdnuggets.com/2022/07/detecting-data-drift-ensuring-production-ml-model-quality-eurybia.html">Tutorial Article</a>
<a href="https://www.kdnuggets.com/2022/07/detecting-data-drift-ensuring-production-ml-model-quality-eurybia.html">Tutorial Article</a>
</p>
</div>

Expand Down Expand Up @@ -61,24 +61,28 @@ The 3 steps to display results:

```python
from eurybia import SmartDrift

sd = SmartDrift(
df_current=df_current,
df_baseline=df_baseline,
deployed_model=my_model, # Optional: put in perspective result with importance on deployed model
encoding=my_encoder, # Optional: if deployed_model and encoder to use this model
dataset_names={"df_current": "Current dataset Name", "df_baseline": "Baseline dataset Name"} # Optional: Names for outputs
)
df_current=df_current,
df_baseline=df_baseline,
deployed_model=my_model, # Optional: put in perspective result with importance on deployed model
encoding=my_encoder, # Optional: if deployed_model and encoder to use this model
dataset_names={
"df_current": "Current dataset Name",
"df_baseline": "Baseline dataset Name",
}, # Optional: Names for outputs
)
```

- Step 2: Compile Model
> There are different ways to compile the SmartDrift object

```python
sd.compile(
full_validation=True, # Optional: to save time, leave the default False value. If True, analyze consistency on modalities between columns.
date_compile_auc='01/01/2022', # Optional: useful when computing the drift for a time that is not now
datadrift_file="datadrift_auc.csv", # Optional: name of the csv file that contains the performance history of data drift
)
full_validation=True, # Optional: to save time, leave the default False value. If True, analyze consistency on modalities between columns.
date_compile_auc="01/01/2022", # Optional: useful when computing the drift for a time that is not now
datadrift_file="datadrift_auc.csv", # Optional: name of the csv file that contains the performance history of data drift
)
```

- Step 3: Generate report
Expand All @@ -87,18 +91,18 @@ sd.compile(

```python
sd.generate_report(
output_file='output/my_report_name.html',
title_story="my_report_title",
title_description="my_report_subtitle", # Optional: add a subtitle to describe report
project_info_file='project_info.yml' # Optional: add information on report
)
output_file="output/my_report_name.html",
title_story="my_report_title",
title_description="my_report_subtitle", # Optional: add a subtitle to describe report
project_info_file="project_info.yml", # Optional: add information on report
)
```

[Report Example](https://eurybia.readthedocs.io/en/latest/report.html)

## 🛠 Installation

Eurybia is intended to work with Python versions 3.7 to 3.9. Installation can be done with pip:
Eurybia is intended to work with Python versions 3.7 to 3.10. Installation can be done with pip:

```
pip install eurybia
Expand Down
2 changes: 1 addition & 1 deletion requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
nbsphinx==0.8.8
sphinx_material==0.0.35
pytest==5.2.3
pytest>=5.2.3
pytest-cov==2.8.1
scikit-learn>=0.24.2
xgboost>=1.0.0
Expand Down
16 changes: 11 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
setup(
name="eurybia", # Replace with your own username
version=version_d["__version__"],
python_requires=">3.6, < 3.10",
python_requires=">3.6, < 3.11",
url="https://github.com/MAIF/eurybia",
author="Nicolas Roux, Johann Martin, Thomas Bouché",
author_email="[email protected]",
Expand All @@ -50,6 +50,7 @@
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
],
Expand Down Expand Up @@ -77,10 +78,15 @@
("data", ["eurybia/data/titanic_original.csv"]),
("data", ["eurybia/data/US_Accidents_extract.csv"]),
("style", ["eurybia/style/colors.json"]),
("assets", ["eurybia/assets/local-report-base.css",
"eurybia/assets/local-report-base.js",
"eurybia/assets/logo_eurybia_dp.png",
"eurybia/assets/report_template.html"]),
(
"assets",
[
"eurybia/assets/local-report-base.css",
"eurybia/assets/local-report-base.js",
"eurybia/assets/logo_eurybia_dp.png",
"eurybia/assets/report_template.html",
],
),
],
include_package_data=True,
setup_requires=setup_requirements,
Expand Down