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

Allow me to access loss values for GAN-based synthesizers #1681

Merged
merged 4 commits into from
Nov 27, 2023

Conversation

frances-h
Copy link
Contributor

Resolve #1671

@frances-h frances-h requested a review from a team as a code owner November 17, 2023 17:50
@frances-h frances-h requested review from rwedge and amontanez24 and removed request for a team November 17, 2023 17:50
@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d2df364) 97.09% compared to head (8032ab8) 97.10%.
Report is 1 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1681   +/-   ##
=======================================
  Coverage   97.09%   97.10%           
=======================================
  Files          47       47           
  Lines        4374     4386   +12     
=======================================
+ Hits         4247     4259   +12     
  Misses        127      127           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

sdv/sequential/par.py Outdated Show resolved Hide resolved
Copy link
Contributor

@rwedge rwedge left a comment

Choose a reason for hiding this comment

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

LGTM

pd.DataFrame:
Dataframe of loss values per epoch
"""
synthesizer = self._table_synthesizers[table_name]
Copy link
Contributor

Choose a reason for hiding this comment

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

should we error if the table name is bad? I think there is an error message we use in a lot of places for that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we usually use _validate_table_name but the full error message doesn't really make sense in this context, so I used an edited version.

@@ -349,3 +349,23 @@ def log_numerical_distributions_error(numerical_distributions, processed_data_co
f"cannot be applied to column '{column}' because it no longer "
'exists after preprocessing.'
)


class GANMixin:
Copy link
Contributor

Choose a reason for hiding this comment

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

How do you feel about putting this class in the ctgan file since all the gans are already there? Also I think VAEs aren't technically GANs. Maybe we should change the name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to LossValuesMixin instead

Copy link
Contributor

@amontanez24 amontanez24 left a comment

Choose a reason for hiding this comment

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

Thanks for addressing! :shipit:

@frances-h frances-h merged commit ae7321f into main Nov 27, 2023
37 checks passed
@frances-h frances-h deleted the issue-1671-access-loss-values branch November 27, 2023 19:40
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.

Allow me to access loss values for GAN-based synthesizers
4 participants