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

Augmentation benchmark #150

Merged
merged 18 commits into from
Mar 15, 2023
Merged

Augmentation benchmark #150

merged 18 commits into from
Mar 15, 2023

Conversation

robsdavis
Copy link
Contributor

@robsdavis robsdavis commented Mar 13, 2023

Description

Added an augmentation benchmark pipeline.

closes #136

Affected Dependencies

None

How has this been tested?

  • Tests added to test_benchmarks.py and metrics/test_api.py

Checklist

@robsdavis robsdavis added the enhancement New feature or request label Mar 13, 2023
@robsdavis robsdavis requested a review from bcebere March 13, 2023 11:40
@robsdavis robsdavis linked an issue Mar 13, 2023 that may be closed by this pull request
@@ -65,7 +65,7 @@ def test_plugin_hyperparams(test_plugin: Plugin) -> None:
],
)
def test_plugin_fit(tte_strategy: str) -> None:
test_plugin = plugin(tte_strategy=tte_strategy, device="cpu", **plugins_args)
test_plugin = plugin(tte_strategy=tte_strategy, device="zz", **plugins_args)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does zz mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo. Now fixed

use_cache=use_cache,
),
X_gt.sample(eval_cnt),
X_augmented.sample(eval_cnt),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is sample(eval_cnt) relevant for the augmented dataset? The augmented dataset will be larger than X_gt everytime, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good point. I'll remove the sample call in the next push

@robsdavis robsdavis changed the title [WIP] Augmentation benchmark Augmentation benchmark Mar 14, 2023
Copy link
Contributor

@bcebere bcebere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Some changes are still needed, after that this can be merged

if not set(ad_hoc_augment_vals.keys()).issubset(
set(X_train[fairness_column].values)
):
print(set(X_train[fairness_column].values))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't leave prints in the code. use log if the logs are needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted.

@@ -290,8 +295,6 @@ class GenericDataLoader(DataLoader):
>>> from synthcity.plugins.core.dataloader import GenericDataLoader
>>> X, y = load_diabetes(return_X_y=True, as_frame=True)
>>> X["target"] = y
>>> # Important note: preprocessing data with OneHotEncoder or StandardScaler is not needed or recommended.
>>> # Synthcity handles feature encoding and standardization internally.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove these lines?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accident, re-instated.



@pytest.mark.parametrize(
"fairness_column, rule, strict, add_hoc_vals",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean ad_hoc?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, fixed

@robsdavis robsdavis merged commit cf6ea56 into main Mar 15, 2023
@robsdavis robsdavis deleted the augmentation-benchmark branch March 15, 2023 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Benchmark pipeline for data augmentation tasks
2 participants