Garv98/fairdp-models
Tabular Classification • Updated
Error code: DatasetGenerationError
Exception: TypeError
Message: Couldn't cast array of type
struct<method: string, name: string, private: bool, eps: null, summary: struct<accuracy: double, balanced_accuracy: double, precision: double, recall: double, f1: double, selection_rate: double, roc_auc: double, ece: double, sex_accuracy_gap: double, sex_worst_accuracy: double, sex_tpr_gap: double, sex_worst_tpr: double, sex_fpr_gap: double, sex_selection_rate_gap: double, sex_f1_gap: double, sex_worst_f1: double, sex_eodds_diff: double, sex_n_groups_eval: int64, sex_n_groups_total: int64, race_accuracy_gap: double, race_worst_accuracy: double, race_tpr_gap: double, race_worst_tpr: double, race_fpr_gap: double, race_selection_rate_gap: double, race_f1_gap: double, race_worst_f1: double, race_eodds_diff: double, race_n_groups_eval: int64, race_n_groups_total: int64, age_accuracy_gap: double, age_worst_accuracy: double, age_tpr_gap: double, age_worst_tpr: double, age_fpr_gap: double, age_selection_rate_gap: double, age_f1_gap: double, age_worst_f1: double, age_eodds_diff: double, age_n_groups_eval: int64, age_n_groups_total: int64, intersection_accuracy_gap: double, intersection_worst_accuracy: double, intersection_tpr_gap: double, intersection_worst_tpr: double, intersection_fpr_gap: double, intersection_selection_rate_gap: double, intersection_f1_gap: double, intersection_worst_f1: double, intersection_eodds_diff: double, intersection_n_groups_eval: int64, intersection_n_groups_total: int64, intersection_df_eps: double>, groups: struct<sex: list<item: struct<group: string, n:
...
l, equal_opportunity_diff: double, equalized_odds_diff: double, predictive_parity_diff: double, calibration_gap: double, worst_group_tpr: double, n_groups_eligible: int64, n_groups: int64>, intersection: struct<groups: list<item: struct<group: string, n: int64, n_pos: int64, selection_rate: double, tpr: double, fpr: double, precision: double, ece: double, mean_score: double, base_rate: double, calibration_error: double, eligible: bool>>, demographic_parity_diff: double, disparate_impact_ratio: double, four_fifths_pass: bool, equal_opportunity_diff: double, equalized_odds_diff: double, predictive_parity_diff: double, calibration_gap: double, worst_group_tpr: double, n_groups_eligible: int64, n_groups: int64>, consistency: double>, mia: struct<mia_auc: double, mia_tpr_at_1fpr: double, mia_global_fpr: double, mia_advantage: double, mia_advantage_worst_cell: double, mia_advantage_cell_gap: double>, mia_groups: list<item: struct<attribute: string, group: string, n: int64, n_members: int64, mia_auc: double, tpr_global: double, fpr_global: double, advantage: double>>, cost_of_privacy: struct<sex: struct<di_tpr_max: double, di_tpr_spread: double, di_tpr_std: double, di_tpr_mean: double>, race: struct<di_tpr_max: double, di_tpr_spread: double, di_tpr_std: double, di_tpr_mean: double>, age: struct<di_tpr_max: double, di_tpr_spread: double, di_tpr_std: double, di_tpr_mean: double>, intersection: struct<di_tpr_max: double, di_tpr_spread: double, di_tpr_std: double, di_tpr_mean: double>>>
to
{'private': Value('bool'), 'config': {'batch_size': Value('int64'), 'lr': Value('float64'), 'method': Value('string'), 'epochs': Value('int64'), 'seed': Value('int64')}, 'epochs': List({'epoch': Value('int64'), 'loss': Value('float64'), 'accuracy': Value('float64'), 'balanced_accuracy': Value('float64'), 'recall': Value('float64'), 'intersection_worst_tpr': Value('float64'), 'intersection_tpr_gap': Value('float64')}), 'seconds': Value('float64'), 'trained_at': Value('timestamp[s]')}
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1835, in _prepare_split_single
for key, table in generator:
^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 621, in wrapped
for item in generator(*args, **kwargs):
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 373, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2394, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2328, in cast_table_to_schema
cast_array_to_feature(
~~~~~~~~~~~~~~~~~~~~~^
table[name] if name in table_column_names else pa.array([None] * len(table), type=schema.field(name).type),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
feature,
^^^^^^^^
)
^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1870, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2170, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{_short_str(array.type)}\nto\n{_short_str(feature)}")
TypeError: Couldn't cast array of type
struct<method: string, name: string, private: bool, eps: null, summary: struct<accuracy: double, balanced_accuracy: double, precision: double, recall: double, f1: double, selection_rate: double, roc_auc: double, ece: double, sex_accuracy_gap: double, sex_worst_accuracy: double, sex_tpr_gap: double, sex_worst_tpr: double, sex_fpr_gap: double, sex_selection_rate_gap: double, sex_f1_gap: double, sex_worst_f1: double, sex_eodds_diff: double, sex_n_groups_eval: int64, sex_n_groups_total: int64, race_accuracy_gap: double, race_worst_accuracy: double, race_tpr_gap: double, race_worst_tpr: double, race_fpr_gap: double, race_selection_rate_gap: double, race_f1_gap: double, race_worst_f1: double, race_eodds_diff: double, race_n_groups_eval: int64, race_n_groups_total: int64, age_accuracy_gap: double, age_worst_accuracy: double, age_tpr_gap: double, age_worst_tpr: double, age_fpr_gap: double, age_selection_rate_gap: double, age_f1_gap: double, age_worst_f1: double, age_eodds_diff: double, age_n_groups_eval: int64, age_n_groups_total: int64, intersection_accuracy_gap: double, intersection_worst_accuracy: double, intersection_tpr_gap: double, intersection_worst_tpr: double, intersection_fpr_gap: double, intersection_selection_rate_gap: double, intersection_f1_gap: double, intersection_worst_f1: double, intersection_eodds_diff: double, intersection_n_groups_eval: int64, intersection_n_groups_total: int64, intersection_df_eps: double>, groups: struct<sex: list<item: struct<group: string, n:
...
l, equal_opportunity_diff: double, equalized_odds_diff: double, predictive_parity_diff: double, calibration_gap: double, worst_group_tpr: double, n_groups_eligible: int64, n_groups: int64>, intersection: struct<groups: list<item: struct<group: string, n: int64, n_pos: int64, selection_rate: double, tpr: double, fpr: double, precision: double, ece: double, mean_score: double, base_rate: double, calibration_error: double, eligible: bool>>, demographic_parity_diff: double, disparate_impact_ratio: double, four_fifths_pass: bool, equal_opportunity_diff: double, equalized_odds_diff: double, predictive_parity_diff: double, calibration_gap: double, worst_group_tpr: double, n_groups_eligible: int64, n_groups: int64>, consistency: double>, mia: struct<mia_auc: double, mia_tpr_at_1fpr: double, mia_global_fpr: double, mia_advantage: double, mia_advantage_worst_cell: double, mia_advantage_cell_gap: double>, mia_groups: list<item: struct<attribute: string, group: string, n: int64, n_members: int64, mia_auc: double, tpr_global: double, fpr_global: double, advantage: double>>, cost_of_privacy: struct<sex: struct<di_tpr_max: double, di_tpr_spread: double, di_tpr_std: double, di_tpr_mean: double>, race: struct<di_tpr_max: double, di_tpr_spread: double, di_tpr_std: double, di_tpr_mean: double>, age: struct<di_tpr_max: double, di_tpr_spread: double, di_tpr_std: double, di_tpr_mean: double>, intersection: struct<di_tpr_max: double, di_tpr_spread: double, di_tpr_std: double, di_tpr_mean: double>>>
to
{'private': Value('bool'), 'config': {'batch_size': Value('int64'), 'lr': Value('float64'), 'method': Value('string'), 'epochs': Value('int64'), 'seed': Value('int64')}, 'epochs': List({'epoch': Value('int64'), 'loss': Value('float64'), 'accuracy': Value('float64'), 'balanced_accuracy': Value('float64'), 'recall': Value('float64'), 'intersection_worst_tpr': Value('float64'), 'intersection_tpr_gap': Value('float64')}), 'seconds': Value('float64'), 'trained_at': Value('timestamp[s]')}
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1379, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
~~~~~~~~~~~~~~~~~~~~~~~~~^
builder, max_dataset_size_bytes=max_dataset_size_bytes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 956, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1702, in _prepare_split
for job_id, done, content in self._prepare_split_single(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1887, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.exceptions.DatasetGenerationError: An error occurred while generating the datasetNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
erm__inf dict | groupdro__inf dict | dpsgd__1 dict | dpsgd__3 dict | dpsgd__8 dict | dpsgd_balanced__1 dict | dpsgd_balanced__3 dict | dpsgd_balanced__8 dict | ig_dpsgd__1 dict | ig_dpsgd__3 dict | ig_dpsgd__8 dict |
|---|---|---|---|---|---|---|---|---|---|---|
{
"private": false,
"config": {
"batch_size": 64,
"lr": 0.001,
"method": "erm",
"epochs": 10,
"seed": 17
},
"epochs": [
{
"epoch": 1,
"loss": 0.34546,
"accuracy": 0.85294,
"balanced_accuracy": 0.76612,
"recall": 0.59949,
"intersection_worst_tpr": 0.370... | {
"private": false,
"config": {
"batch_size": 64,
"lr": 0.001,
"method": "groupdro",
"epochs": 10,
"seed": 17
},
"epochs": [
{
"epoch": 1,
"loss": 0.25401,
"accuracy": 0.83265,
"balanced_accuracy": 0.80408,
"recall": 0.74925,
"intersection_worst_tpr": ... | {
"private": true,
"config": {
"expected_batch_size": 256,
"lr": 0.002,
"max_grad_norm": 1,
"clip_mode": "flat",
"epochs": 10,
"target_epsilon": 1,
"seed": 17
},
"noise": {
"sigma_eff": 1.35498,
"sigma_grad": 1.35498,
"sigma_stats": null,
"aux_frac": 0,
"stats_blo... | {
"private": true,
"config": {
"expected_batch_size": 256,
"lr": 0.002,
"max_grad_norm": 1,
"clip_mode": "flat",
"epochs": 10,
"target_epsilon": 3,
"seed": 17
},
"noise": {
"sigma_eff": 0.81604,
"sigma_grad": 0.81604,
"sigma_stats": null,
"aux_frac": 0,
"stats_blo... | {
"private": true,
"config": {
"expected_batch_size": 256,
"lr": 0.002,
"max_grad_norm": 1,
"clip_mode": "flat",
"epochs": 10,
"target_epsilon": 8,
"seed": 17
},
"noise": {
"sigma_eff": 0.59021,
"sigma_grad": 0.59021,
"sigma_stats": null,
"aux_frac": 0,
"stats_blo... | {
"private": true,
"config": {
"expected_batch_size": 256,
"lr": 0.002,
"max_grad_norm": 1,
"clip_mode": "flat",
"balance_labels": true,
"aux_frac": 0.05,
"epochs": 10,
"target_epsilon": 1,
"seed": 17
},
"noise": {
"sigma_eff": 1.35498,
"sigma_grad": 1.39018,
"sig... | {
"private": true,
"config": {
"expected_batch_size": 256,
"lr": 0.002,
"max_grad_norm": 1,
"clip_mode": "flat",
"balance_labels": true,
"aux_frac": 0.05,
"epochs": 10,
"target_epsilon": 3,
"seed": 17
},
"noise": {
"sigma_eff": 0.81604,
"sigma_grad": 0.83724,
"sig... | {
"private": true,
"config": {
"expected_batch_size": 256,
"lr": 0.002,
"max_grad_norm": 1,
"clip_mode": "flat",
"balance_labels": true,
"aux_frac": 0.05,
"epochs": 10,
"target_epsilon": 8,
"seed": 17
},
"noise": {
"sigma_eff": 0.59021,
"sigma_grad": 0.60554,
"sig... | {
"private": true,
"config": {
"expected_batch_size": 256,
"lr": 0.002,
"max_grad_norm": 1,
"clip_mode": "flat",
"dro": true,
"smoothing": true,
"aux_frac": 0.05,
"epochs": 10,
"target_epsilon": 1,
"seed": 17
},
"noise": {
"sigma_eff": 1.35498,
"sigma_grad": 1.390... | {
"private": true,
"config": {
"expected_batch_size": 256,
"lr": 0.002,
"max_grad_norm": 1,
"clip_mode": "flat",
"dro": true,
"smoothing": true,
"aux_frac": 0.05,
"epochs": 10,
"target_epsilon": 3,
"seed": 17
},
"noise": {
"sigma_eff": 0.81604,
"sigma_grad": 0.837... | {
"private": true,
"config": {
"expected_batch_size": 256,
"lr": 0.002,
"max_grad_norm": 1,
"clip_mode": "flat",
"dro": true,
"smoothing": true,
"aux_frac": 0.05,
"epochs": 10,
"target_epsilon": 8,
"seed": 17
},
"noise": {
"sigma_eff": 0.59021,
"sigma_grad": 0.605... |
Measured results behind the FairDP audit console (https://fairdp-audit.vercel.app) and the models in Garv98/fairdp-models.
| File | Contents |
|---|---|
evaluation.json |
Per model: utility, per-group metrics for sex, race, age and their intersection, fairness criteria, membership-inference attack, cost of privacy |
scores.json |
Validation and test labels, group codes and every model's predicted probability (used for threshold mitigation) |
study.json |
Multi-seed robustness study (pilot) |
training.json |
Training configuration, noise multipliers and accounted ε per model |
proxy.json |
Proxy audit: how well the other features reveal sex and race |
llm/<model>/ |
LLM audit on Groq. L1: zero-shot classification of 200 test people. L2: counterfactual identity swaps, 40 people × 8 identities |
The LLM samples are small, so treat those numbers as indicative. Code: https://github.com/Garv98/Fairness-aware-differential-private-learning-and-evaluation-of-LLMs