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

Show warning when loading a synthesizer on a previously-saved SDV version #1857

Conversation

pvk-developer
Copy link
Member

@pvk-developer pvk-developer commented Mar 19, 2024

Resolves #1836
CU-86azkp7mu

Added a new attribute to the synthesizers called _fitted_sdv_enterprise_version which will only be added to get_info if it is not None.

@pvk-developer pvk-developer requested a review from a team as a code owner March 19, 2024 13:27
@pvk-developer pvk-developer requested review from amontanez24 and removed request for a team March 19, 2024 13:27
@sdv-team
Copy link
Contributor

@pvk-developer pvk-developer requested review from R-Palazzo and fealho and removed request for amontanez24 March 19, 2024 13:27
@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.34%. Comparing base (7b1b9b7) to head (a006215).

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1857      +/-   ##
==========================================
+ Coverage   97.32%   97.34%   +0.01%     
==========================================
  Files          51       51              
  Lines        4823     4858      +35     
==========================================
+ Hits         4694     4729      +35     
  Misses        129      129              

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

Copy link
Contributor

@R-Palazzo R-Palazzo left a comment

Choose a reason for hiding this comment

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

Looks good!
Good job, just let few suggestions

sdv/_utils.py Outdated Show resolved Hide resolved
tests/unit/test__utils.py Outdated Show resolved Hide resolved
Copy link
Contributor

@R-Palazzo R-Palazzo left a comment

Choose a reason for hiding this comment

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

LGTM!

@pvk-developer pvk-developer requested review from frances-h and removed request for fealho March 20, 2024 17:06
sdv/_utils.py Outdated
current_public_version = getattr(version, 'public', None)
current_enterprise_version = getattr(version, 'enterprise', None)
public_missmatch = current_public_version != synthesizer._fitted_sdv_version
enterprise_missmatch = current_enterprise_version != synthesizer._fitted_sdv_enterprise_version
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can't assume loaded synthesizers will have this attribute since it's being added

Copy link
Member Author

@pvk-developer pvk-developer Mar 21, 2024

Choose a reason for hiding this comment

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

This should be addressed now using getattr instead of directly accessing it. a006215

@pvk-developer pvk-developer merged commit 4fbef8c into main Mar 21, 2024
37 checks passed
@pvk-developer pvk-developer deleted the issue-1836-show-warning-when-loading-synthesizer-previously-saved branch March 21, 2024 16:37
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.

Show warning when loading a synthesizer on a previously-saved SDV version
5 participants