BenchmarkDPFair 0.2.4__tar.gz → 0.2.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. {benchmarkdpfair-0.2.4/src/BenchmarkDPFair.egg-info → benchmarkdpfair-0.2.6}/PKG-INFO +35 -16
  2. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/README.md +31 -14
  3. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/pyproject.toml +4 -2
  4. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6/src/BenchmarkDPFair.egg-info}/PKG-INFO +35 -16
  5. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair.egg-info/SOURCES.txt +1 -4
  6. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair.egg-info/requires.txt +9 -1
  7. benchmarkdpfair-0.2.4/tests/test_benchmark.py +0 -31
  8. benchmarkdpfair-0.2.4/tests/test_dataconf.py +0 -25
  9. benchmarkdpfair-0.2.4/tests/test_datagen.py +0 -0
  10. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/LICENSE +0 -0
  11. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/setup.cfg +0 -0
  12. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair/Benchmark/__init__.py +0 -0
  13. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair/Benchmark/benchmark.py +0 -0
  14. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair/Benchmark/dataconf.py +0 -0
  15. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair/Benchmark/utils/__init__.py +0 -0
  16. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair/Benchmark/utils/auxiliar.py +0 -0
  17. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair/Benchmark/utils/benchmark.py +0 -0
  18. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair/Benchmark/utils/inp.py +0 -0
  19. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair/Benchmark/utils/pos.py +0 -0
  20. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair/Benchmark/utils/pre.py +0 -0
  21. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair/Benchmark/utils/types.py +0 -0
  22. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair/Benchmark/utils/verifiers.py +0 -0
  23. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair/DataGenerator/__init__.py +0 -0
  24. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair/DataGenerator/dataconf.py +0 -0
  25. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair/DataGenerator/datagen.py +0 -0
  26. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair/DataGenerator/utils/verifiers.py +0 -0
  27. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair/__init__.py +0 -0
  28. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair.egg-info/dependency_links.txt +0 -0
  29. {benchmarkdpfair-0.2.4 → benchmarkdpfair-0.2.6}/src/BenchmarkDPFair.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: BenchmarkDPFair
3
- Version: 0.2.4
3
+ Version: 0.2.6
4
4
  Summary: A differentially private data synthesizer and fairness intervention benchmark framework
5
5
  Author-email: Vinicius Gabriel Angelozzi Verona de Resende <verona.projects@tutanota.com>, Héber Hwang Arcolezi <heber.hwang-arcolezi@etsmtl.ca>
6
6
  License: MIT License
@@ -44,7 +44,9 @@ Requires-Dist: smartnoise-sql>=1.0.6
44
44
  Requires-Dist: smartnoise-synth>=1.0.5
45
45
  Requires-Dist: tabulate>=0.9.0
46
46
  Requires-Dist: ucimlrepo>=0.0.7
47
- Requires-Dist: xgboost-cpu>=3.2.0
47
+ Requires-Dist: xgboost>=3.2.0; sys_platform == "darwin"
48
+ Requires-Dist: xgboost-cpu>=3.2.0; sys_platform == "linux"
49
+ Requires-Dist: xgboost-cpu>=3.2.0; sys_platform == "win32"
48
50
  Requires-Dist: cvxpy>=1.6.5
49
51
  Requires-Dist: chex>=0.1.87
50
52
  Requires-Dist: BlackBoxAuditing==0.1.54
@@ -68,27 +70,45 @@ This repository provides a Python framework for **benchmarking fairness mechanis
68
70
 
69
71
  ## Installation
70
72
 
71
- > From source
72
- To install, either use PyPi to isntall it, or clone the repository and install dependencies:
73
+ First, we strongly recommend creating a new Python environment before installing the package. This helps maintain a clean and reproducible setup, facilitates dependency and version management and update, and minimises potential conflicts with previously installed libraries.
73
74
 
74
75
  ```bash
75
- git clone https://github.com/vinicius-verona/dp-fair-intervention-benchmark.git
76
- cd dp-fair-intervention-benchmark
77
-
78
76
  python3 -m venv dpfair-env
79
- source dpfair-env/bin/activate
77
+ source dpfair-env/bin/activate # On Windows: dpfair-env\\Scripts\\activate
78
+ # Installation approach via PyPi or source installation
79
+ ```
80
80
 
81
+ If you are a Windows or Linux user, please install PyTorch CPU-only dependencies: [Step not required for Mac users]
82
+ ```bash
81
83
  pip install torch --index-url https://download.pytorch.org/whl/cpu
82
- pip install -e .
83
84
  ```
84
85
 
85
- > Using PyPi **(SUGGESTED)**
86
+ Users on MacOS are required to install `llvm-openmp`, either using conda or brew, as below:
87
+
88
+ **Conda**:
89
+ ```bash
90
+ conda install -c conda-forge llvm-openmp
91
+ ```
92
+ **Brew**:
93
+ ```bash
94
+ brew install libomp
95
+ ```
96
+
97
+ Then, the library installation can proceed as per usual.
98
+
99
+ Our recommended method is via PyPI. With a Python 3.9+ and <3.13 environment:
100
+
86
101
  ```bash
87
- python3 -m venv dpfair-env
88
- source dpfair-env/bin/activate
89
- pip install torch --index-url https://download.pytorch.org/whl/cpu
90
102
  pip install BenchmarkDPFair
91
- ````
103
+ ```
104
+
105
+ Alternatively, there is the possibility to install from source, which also gives access to the `data/`, `example/`, and `notebook/` directories (be aware that these may consume more resources on your disk given the data provided):
106
+
107
+ ```bash
108
+ git clone https://github.com/vinicius-verona/dp-fair-intervention-benchmark.git
109
+ cd dp-fair-intervention-benchmark
110
+ pip install -e .
111
+ ```
92
112
 
93
113
  ---
94
114
 
@@ -97,8 +117,7 @@ pip install BenchmarkDPFair
97
117
  ```
98
118
  ├── data/ # Pre-offered datasets
99
119
  ├── src/ # Core source code
100
- ├── examples/ # Some demo
101
- ├── tests/ # Unit tests
120
+ ├── example/ # Files used in the main paper and a dummy example.
102
121
  └── README.md
103
122
  ```
104
123
 
@@ -16,27 +16,45 @@ This repository provides a Python framework for **benchmarking fairness mechanis
16
16
 
17
17
  ## Installation
18
18
 
19
- > From source
20
- To install, either use PyPi to isntall it, or clone the repository and install dependencies:
19
+ First, we strongly recommend creating a new Python environment before installing the package. This helps maintain a clean and reproducible setup, facilitates dependency and version management and update, and minimises potential conflicts with previously installed libraries.
21
20
 
22
21
  ```bash
23
- git clone https://github.com/vinicius-verona/dp-fair-intervention-benchmark.git
24
- cd dp-fair-intervention-benchmark
25
-
26
22
  python3 -m venv dpfair-env
27
- source dpfair-env/bin/activate
23
+ source dpfair-env/bin/activate # On Windows: dpfair-env\\Scripts\\activate
24
+ # Installation approach via PyPi or source installation
25
+ ```
28
26
 
27
+ If you are a Windows or Linux user, please install PyTorch CPU-only dependencies: [Step not required for Mac users]
28
+ ```bash
29
29
  pip install torch --index-url https://download.pytorch.org/whl/cpu
30
- pip install -e .
31
30
  ```
32
31
 
33
- > Using PyPi **(SUGGESTED)**
32
+ Users on MacOS are required to install `llvm-openmp`, either using conda or brew, as below:
33
+
34
+ **Conda**:
35
+ ```bash
36
+ conda install -c conda-forge llvm-openmp
37
+ ```
38
+ **Brew**:
39
+ ```bash
40
+ brew install libomp
41
+ ```
42
+
43
+ Then, the library installation can proceed as per usual.
44
+
45
+ Our recommended method is via PyPI. With a Python 3.9+ and <3.13 environment:
46
+
34
47
  ```bash
35
- python3 -m venv dpfair-env
36
- source dpfair-env/bin/activate
37
- pip install torch --index-url https://download.pytorch.org/whl/cpu
38
48
  pip install BenchmarkDPFair
39
- ````
49
+ ```
50
+
51
+ Alternatively, there is the possibility to install from source, which also gives access to the `data/`, `example/`, and `notebook/` directories (be aware that these may consume more resources on your disk given the data provided):
52
+
53
+ ```bash
54
+ git clone https://github.com/vinicius-verona/dp-fair-intervention-benchmark.git
55
+ cd dp-fair-intervention-benchmark
56
+ pip install -e .
57
+ ```
40
58
 
41
59
  ---
42
60
 
@@ -45,8 +63,7 @@ pip install BenchmarkDPFair
45
63
  ```
46
64
  ├── data/ # Pre-offered datasets
47
65
  ├── src/ # Core source code
48
- ├── examples/ # Some demo
49
- ├── tests/ # Unit tests
66
+ ├── example/ # Files used in the main paper and a dummy example.
50
67
  └── README.md
51
68
  ```
52
69
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "BenchmarkDPFair"
7
- version = "0.2.4"
7
+ version = "0.2.6"
8
8
  description = "A differentially private data synthesizer and fairness intervention benchmark framework"
9
9
  authors = [
10
10
  { name="Vinicius Gabriel Angelozzi Verona de Resende", email="verona.projects@tutanota.com" },
@@ -27,7 +27,9 @@ dependencies = [
27
27
  "smartnoise-synth>=1.0.5",
28
28
  "tabulate>=0.9.0",
29
29
  "ucimlrepo>=0.0.7",
30
- "xgboost-cpu>=3.2.0",
30
+ "xgboost>=3.2.0; sys_platform == 'darwin'",
31
+ "xgboost-cpu>=3.2.0; sys_platform == 'linux'",
32
+ "xgboost-cpu>=3.2.0; sys_platform == 'win32'",
31
33
  "cvxpy>=1.6.5",
32
34
  "chex>=0.1.87",
33
35
  "BlackBoxAuditing==0.1.54"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: BenchmarkDPFair
3
- Version: 0.2.4
3
+ Version: 0.2.6
4
4
  Summary: A differentially private data synthesizer and fairness intervention benchmark framework
5
5
  Author-email: Vinicius Gabriel Angelozzi Verona de Resende <verona.projects@tutanota.com>, Héber Hwang Arcolezi <heber.hwang-arcolezi@etsmtl.ca>
6
6
  License: MIT License
@@ -44,7 +44,9 @@ Requires-Dist: smartnoise-sql>=1.0.6
44
44
  Requires-Dist: smartnoise-synth>=1.0.5
45
45
  Requires-Dist: tabulate>=0.9.0
46
46
  Requires-Dist: ucimlrepo>=0.0.7
47
- Requires-Dist: xgboost-cpu>=3.2.0
47
+ Requires-Dist: xgboost>=3.2.0; sys_platform == "darwin"
48
+ Requires-Dist: xgboost-cpu>=3.2.0; sys_platform == "linux"
49
+ Requires-Dist: xgboost-cpu>=3.2.0; sys_platform == "win32"
48
50
  Requires-Dist: cvxpy>=1.6.5
49
51
  Requires-Dist: chex>=0.1.87
50
52
  Requires-Dist: BlackBoxAuditing==0.1.54
@@ -68,27 +70,45 @@ This repository provides a Python framework for **benchmarking fairness mechanis
68
70
 
69
71
  ## Installation
70
72
 
71
- > From source
72
- To install, either use PyPi to isntall it, or clone the repository and install dependencies:
73
+ First, we strongly recommend creating a new Python environment before installing the package. This helps maintain a clean and reproducible setup, facilitates dependency and version management and update, and minimises potential conflicts with previously installed libraries.
73
74
 
74
75
  ```bash
75
- git clone https://github.com/vinicius-verona/dp-fair-intervention-benchmark.git
76
- cd dp-fair-intervention-benchmark
77
-
78
76
  python3 -m venv dpfair-env
79
- source dpfair-env/bin/activate
77
+ source dpfair-env/bin/activate # On Windows: dpfair-env\\Scripts\\activate
78
+ # Installation approach via PyPi or source installation
79
+ ```
80
80
 
81
+ If you are a Windows or Linux user, please install PyTorch CPU-only dependencies: [Step not required for Mac users]
82
+ ```bash
81
83
  pip install torch --index-url https://download.pytorch.org/whl/cpu
82
- pip install -e .
83
84
  ```
84
85
 
85
- > Using PyPi **(SUGGESTED)**
86
+ Users on MacOS are required to install `llvm-openmp`, either using conda or brew, as below:
87
+
88
+ **Conda**:
89
+ ```bash
90
+ conda install -c conda-forge llvm-openmp
91
+ ```
92
+ **Brew**:
93
+ ```bash
94
+ brew install libomp
95
+ ```
96
+
97
+ Then, the library installation can proceed as per usual.
98
+
99
+ Our recommended method is via PyPI. With a Python 3.9+ and <3.13 environment:
100
+
86
101
  ```bash
87
- python3 -m venv dpfair-env
88
- source dpfair-env/bin/activate
89
- pip install torch --index-url https://download.pytorch.org/whl/cpu
90
102
  pip install BenchmarkDPFair
91
- ````
103
+ ```
104
+
105
+ Alternatively, there is the possibility to install from source, which also gives access to the `data/`, `example/`, and `notebook/` directories (be aware that these may consume more resources on your disk given the data provided):
106
+
107
+ ```bash
108
+ git clone https://github.com/vinicius-verona/dp-fair-intervention-benchmark.git
109
+ cd dp-fair-intervention-benchmark
110
+ pip install -e .
111
+ ```
92
112
 
93
113
  ---
94
114
 
@@ -97,8 +117,7 @@ pip install BenchmarkDPFair
97
117
  ```
98
118
  ├── data/ # Pre-offered datasets
99
119
  ├── src/ # Core source code
100
- ├── examples/ # Some demo
101
- ├── tests/ # Unit tests
120
+ ├── example/ # Files used in the main paper and a dummy example.
102
121
  └── README.md
103
122
  ```
104
123
 
@@ -21,7 +21,4 @@ src/BenchmarkDPFair/Benchmark/utils/verifiers.py
21
21
  src/BenchmarkDPFair/DataGenerator/__init__.py
22
22
  src/BenchmarkDPFair/DataGenerator/dataconf.py
23
23
  src/BenchmarkDPFair/DataGenerator/datagen.py
24
- src/BenchmarkDPFair/DataGenerator/utils/verifiers.py
25
- tests/test_benchmark.py
26
- tests/test_dataconf.py
27
- tests/test_datagen.py
24
+ src/BenchmarkDPFair/DataGenerator/utils/verifiers.py
@@ -12,7 +12,15 @@ smartnoise-sql>=1.0.6
12
12
  smartnoise-synth>=1.0.5
13
13
  tabulate>=0.9.0
14
14
  ucimlrepo>=0.0.7
15
- xgboost-cpu>=3.2.0
16
15
  cvxpy>=1.6.5
17
16
  chex>=0.1.87
18
17
  BlackBoxAuditing==0.1.54
18
+
19
+ [:sys_platform == "darwin"]
20
+ xgboost>=3.2.0
21
+
22
+ [:sys_platform == "linux"]
23
+ xgboost-cpu>=3.2.0
24
+
25
+ [:sys_platform == "win32"]
26
+ xgboost-cpu>=3.2.0
@@ -1,31 +0,0 @@
1
- import sys
2
- from pathlib import Path
3
-
4
- # Add src/ to the Python path
5
- sys.path.insert(0, str(Path(__file__).resolve().parent.parent / "src"))
6
-
7
- from Benchmark.dataconf import DatasetConfig
8
-
9
-
10
- # Test DatsetConfig object creation
11
-
12
- def test_dataset_config():
13
-
14
- adult = DatasetConfig(
15
- name="Adult",
16
- target="income",
17
- root_dir="../data/",
18
- sensitive_attr="sex",
19
- categorical_cols=['workclass', 'education', 'marital-status', 'occupation', 'relationship', 'race', 'sex', 'native-country', 'income', 'age', 'hours-per-week'],
20
- usecols = [
21
- 'age', 'native-country', 'education', 'marital-status', 'occupation', 'relationship',
22
- 'hours-per-week', 'workclass', 'race', 'sex', 'income'
23
- ]
24
- )
25
-
26
- x = str(adult)
27
- assert x == "DatasetConfig(name=Adult,dir=../data/,target=income,sensitive_attr=sex,categorical_cols=['workclass', 'education', 'marital-status', 'occupation', 'relationship', 'race', 'sex', 'native-country', 'income', 'age', 'hours-per-week'],ordinal_cols=[],continuous_cols=[])"
28
-
29
-
30
- if __name__ == "__main__":
31
- test_dataset_config()
@@ -1,25 +0,0 @@
1
- from Benchmark.dataconf import BenchmarkDatasetConfig
2
-
3
-
4
- # Test DatsetConfig object creation
5
-
6
- def test_dataset_config():
7
-
8
- adult = BenchmarkDatasetConfig(
9
- name="Adult",
10
- target="income",
11
- root_dir="../data/",
12
- sensitive_attr="sex",
13
- categorical_cols=['workclass', 'education', 'marital-status', 'occupation', 'relationship', 'race', 'sex', 'native-country', 'income', 'age', 'hours-per-week'],
14
- usecols = [
15
- 'age', 'native-country', 'education', 'marital-status', 'occupation', 'relationship',
16
- 'hours-per-week', 'workclass', 'race', 'sex', 'income'
17
- ]
18
- )
19
-
20
- x = str(adult)
21
- assert x == "BenchmarkDatasetConfig(name=Adult,dir=../data/,target=income,sensitive_attr=sex,categorical_cols=['workclass', 'education', 'marital-status', 'occupation', 'relationship', 'race', 'sex', 'native-country', 'income', 'age', 'hours-per-week'],ordinal_cols=[],continuous_cols=[])"
22
-
23
-
24
- if __name__ == "__main__":
25
- test_dataset_config()
File without changes
File without changes