-
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
GaussianCopula get_learned_distributions
crashes if nothing was learned
#2339
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2339 +/- ##
==========================================
+ Coverage 98.57% 98.58% +0.01%
==========================================
Files 58 58
Lines 6095 6099 +4
==========================================
+ Hits 6008 6013 +5
+ Misses 87 86 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ 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
e31f325
to
482cc97
Compare
sdv/single_table/copulas.py
Outdated
if self._model is None: | ||
return {} |
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 that this is the more future proof version, reason being that if we update self._model
to be initialized earlier, but to_dict
is empty, we will return the empty {}
otherwise it will crash when accessing parameters['columns']
on an empty dict:
if self._model is None: | |
return {} | |
if not hasattr(self._model, 'to_dict') or not self._model.to_dict(): | |
return {} |
CU-86b2w3hf2
Resolve #2297