GitXplorerGitXplorer
f

cv_bias_amplification

public
8 stars
1 forks
2 issues

Commits

List of commits on branch main.
Unverified
3034fe51e48a05ccb651e3069e4094491a308199

Merge branch 'main' of github.com:fairinternal/cv_bias_amplification

committed 2 years ago
Unverified
353c64f07990af2585cfdf4fd37d9f3816793c73

add headers

committed 2 years ago
Verified
3dc8a8f2b4fb5312aa6f12a4ae48b0aaa88476bc

Update README.md

mmelissah14 committed 2 years ago
Unverified
0f81344020778fe956bc77ef959c4c39b8afdd47

add headers

committed 2 years ago
Verified
980e5232076307280730166e8e982a4fc8af1ad5

Update CONTRIBUTING.md

mmelissah14 committed 2 years ago
Verified
9d695972ca1d86babf8e957161d839a6bd806a77

Create CONTRIBUTING.md

mmelissah14 committed 2 years ago

README

The README file for this repository.

cv_bias_amplification

This repository contains code needed to replicate experiments discussed in "A Systematic Study of Bias Amplification".

Begin by setting up your environment:

module load anaconda3/2021.05
conda create --name conf_bias_amp python=3.7
conda activate conf_bias_amp

Ensure that torch.cuda.is_available() is true.

Cuda 11.1 isn't strictly necessary, but installing it allows us to get PyTorch 1.9+

module load cuda/11.1 
conda install pytorch torchvision cudatoolkit=11.1 -c pytorch -c nvidia
pip install -r requirements.txt

Ready to run!

Training models + running offline measurements

Scripts needed to kick-off and analyze each experiment discussed in the paper can be found in respective folders in configs/. Each experiment directory contains a scripts/ directory which contains a sript generate_experiment_configs.py that can be executed to create the model configs and training_measurements*.py scripts for running offline measurements of key metrics like bias amplification and overconfidence. The description.txt file contains a short explanation of the experiment and useful notes for its exectution. The experiment directories should contain an empty models/ in which configs are stored following execution of generate_experiment_configs.py.

Other directories in the repository (ex: datasets\, losses\, models\) contain infrastructure for actually executing the model training process.

As an example, the following steps can be used to generate the FashionMNIST experiment configs:

  • /my-project-release/my-project/configs/fashionmnist/scripts $ python generate_experiment_configs.py

After the training the models with the configs, you can generate results with:

  • /my-project-release/my-project/configs/fashionmnist/scripts $ python training_measurements.py

Model results are now viewable in /my-project-release/my-project/configs/fashionmnist/scripts/results_overconf.py.

License

cv_bias_amplification is MIT-licensed, as found in the LICENSE file.