-
Notifications
You must be signed in to change notification settings - Fork 26
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
Error Handling #429
Error Handling #429
Conversation
Codecov Report
@@ Coverage Diff @@
## v1.0.0.dev #429 +/- ##
=============================================
Coverage 100.00% 100.00%
=============================================
Files 14 14
Lines 1059 1229 +170
=============================================
+ Hits 1059 1229 +170
Continue to review full report at Codecov.
|
6172d38
to
dd71395
Compare
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.
This is close! Some minor changes
rdt/hyper_transformer.py
Outdated
""" | ||
if not self._config_detected: | ||
warnings.warn( | ||
"Tip: You can use the method 'detect_initial_config' to inspect " |
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.
Although the issue specifies to raise this if the detect method wasn't called, I think this warning should show whenever a config isn't present. Instead of checking if the method was called just check if there are any values set in the field_transformers
and field_sdtypes
rdt/hyper_transformer.py
Outdated
'The data you are trying to fit has different columns than the original ' | ||
f'detected data (unknown columns: {unknown_columns}). Column names and their ' | ||
"sdtypes must be the same. Use the method 'get_config()' to see the expected " | ||
'values.' |
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.
Can we move this message to a variable since it is duplicated?
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.
It's not actually a duplicate, they are just very similar.
rdt/hyper_transformer.py
Outdated
the tip will no longer be shown (for an instance of the HyperTransformer). | ||
""" | ||
if not self._config_detected: | ||
warnings.warn( |
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.
The issue was changed to make this an error
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!
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 this is good to go!
* Add tip for detect_initial_config * Add the rest of the checks * Update errors + add tests + remove sdtypes check * Address feedback * Fix documentation * Fix lint Co-authored-by: Plamen Valentinov Kolev <[email protected]>
Resolve #408.