-
Notifications
You must be signed in to change notification settings - Fork 322
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ 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. |
There was a problem hiding this 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] |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
sdv/single_table/utils.py
Outdated
@@ -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: |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to LossValuesMixin
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing!
Resolve #1671