Skip to content

Ops: Adds poetry template to replace setup.py and requirements.txt #18

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

Merged
merged 1 commit into from
Mar 10, 2023

Conversation

lanterno
Copy link

I've also installed all the libraries requirements from requirements.txt
and updated aif360 to a fork that contains a bug fix.

This PR targets this issue #17

The file will need some more improvements to match the existing setup.py but the baseline requirements are there.

I've also installed all the libraries requirements from requirements.txt
  and updated aif360 to a fork that contains a bug fix.
@JoaoGranja JoaoGranja merged commit 7a24d80 into EqualityAI:use-poetry Mar 10, 2023
JoaoGranja added a commit that referenced this pull request Mar 13, 2023
* Adds poetry template to replace setup.py and requirements.txt (#18)

Added all libraries requirements from requirements.txt. 
Updated aif360 package to a fork that contains a bug fix.

* Add PyPI README.
Update pyproject.toml with urls, classifiers, license, authors

---------

Co-authored-by: Ahmed Elghareeb <ahmeds.elghareeb@gmail.com>
JoaoGranja added a commit that referenced this pull request Mar 17, 2023
* Add models_comparison.py file. This file has functions for comparing the performance of 2 models using mcnemar test or 5x2cv paired t test.

* Add method to FAIR class which compare the performance and fairness metric of several bias mitigation methods.
Apply bias mitigation before comparing the performance of 2 methods.

* Add plot option to compare_mitigation_methods method

* Add 'fairness metric score' to compute paired test 5x2cv.

* Add discrimination threshold argument to FAIR class.
Add draft threshold.py file to calculate discrimination threshold.

* Update ml model before assessing fairness metrics in threshold.py.
Enable matplotlib to show figures.

* Scale fairness metrics value.

* Added docstrings and did some refactoring code

* Fix bug with FAIR class.
Refactor stats.py code.

* Refactor threshold.py code

* Fix bug with FAIR unit tests.
Add threshold to __init__.py.

* Add discrimination_threshold function to threshold module.

* Add FAIR unit tests for new methods "compare_mitigation_methods" and "model_mitigation"

* Add stats unit tests.

* Add threshold unit tests and check input arguments.

* Add docstrings to new methods/functions.
Remove metric_name property of FAIR class.

* Improve docstrings to stats functions.

* Issues fix

* Bug fixed in FAIR bias mitigation method.

* Add binary threshold score function to compute a score based on a discrimination threshold.

* Add input metrics to choose which metrics to show on figure.

* Add unit test to binary_threshold_score function.

* Add some notebook examples with different uses cases.
Add accuracy metric to the Discrimination Threshold class.

* Refactor threshold.py code

* Add docstrings to DiscriminationThreshold class and discrimination_threshold function.
Refactor threshold.py code.

* Fix some issues with unit tests.
Copy internally the machine learning models.

* Revert matplotlib backend after using function of dalex package.
Update threshold-accuracy.ipynb and threshold-f1-score.ipynb notebooks

* Increase default number of thresholds from 50 to 100.
Update threshold-queue-rate.ipynb notebook.

* Add utility cost option to binary_threshold_score function.
Add threshold to paired t test.
Add threshold-utility-cost.ipynb notebook.

* Fix issue #16 - Add random_seed argument to FAIR class to set numpy random seed.

* Fix issue #11 - Inform user of 1/metric calculation.

* Add a check for testing data structure.
Rename variables.

* Add random seed to unit tests.

* Update notebooks adding random seed to get reproducible results.

* Fix issue #10 - The training and testing sets should use the same correlation remover object. I

* Add option to compute the optimal threshold just evaluating the model (no training is computed).

* Add the option to compute the optimal threshold when comparing the mitigation methods.

* Add minimum and maximum bound to threshold range.

* For paired t-test method, when a FAIR object and mitigation method are provided as input arguments, the second model to use will be computed, otherwise the input model_2 is used.

* Update notebooks with new paired t-test and discrimination threshold function options

* Update accuracy notebook

* Change discrimination_threshold arguments, data and target variable, to X, y.
Update discrimination_threshold calls and unit tests.

* Update stats.py with the new discrimination_threshold arguments.

* Change threshold-accuracy.ipynb notebook to use the new arguments of the discrimination_threshold function.

* Change threshold-utility-cost.ipynb, threshold-queue-rate.ipynb and threshold-f1-score.ipynb notebooks to use the new arguments of the discrimination_threshold function.

* Use poetry (#19)

* Adds poetry template to replace setup.py and requirements.txt (#18)

Added all libraries requirements from requirements.txt. 
Updated aif360 package to a fork that contains a bug fix.

* Add PyPI README.
Update pyproject.toml with urls, classifiers, license, authors

---------

Co-authored-by: Ahmed Elghareeb <ahmeds.elghareeb@gmail.com>

* Update ci.yml with poetry

* Update poetry.lock

* Update dependencies versions

* Update ci.yaml to use poetry

* Update ci.yaml to use poetry

* Update ci.yaml to use poetry

* Update ci.yaml to use poetry

* Update ci.yaml to use poetry

* Update ci.yaml to use poetry

* Update ci.yaml to use poetry

* Update ci.yaml to use poetry

* Update pytest version requirement

* Update poetry.lock

* Update ci.yaml

* Update ci.yaml

* Update setup.py to use PyPI_README.md

---------

Co-authored-by: Ahmed Elghareeb <ahmeds.elghareeb@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants