-
Notifications
You must be signed in to change notification settings - Fork 325
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
Set HyperTransformer configuration manually #995
Set HyperTransformer configuration manually #995
Conversation
Codecov Report
@@ Coverage Diff @@
## master #995 +/- ##
==========================================
+ Coverage 70.24% 70.46% +0.21%
==========================================
Files 38 38
Lines 2850 2878 +28
==========================================
+ Hits 2002 2028 +26
- Misses 848 850 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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 mostly looks good to me. I just have a question about where the metadata is being used and why it didn't work before
for name, dtype in dtypes.items(): | ||
dtype = np.dtype(dtype).kind | ||
field_metadata = self._fields_metadata.get(name, {}) | ||
transformer_template = field_metadata.get( |
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.
does this take the metadata into account at all? I'm trying to figure out why it wasn't before and what has changed now. For example in the student_placements
demo it wasn't making the duration
column categorical
even though the metadata said it was
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.
Old code was reading properly the dtype
but was printing the wrong config which leaded to confusions as the transformers
were updated after the detect
. Now both sdtypes
and transformers
are being set corresponding to the dtype
from the metadata
with the set_config
method.
00c9a77
to
4dfad77
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.
Looks good!
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, with a question
|
||
if transformer_template is None: | ||
sdtypes[name] = self._DTYPES_TO_TYPES.get(dtype, {}).get('type', 'categorical') |
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.
Is there a unit test that checks this case (when transformer_template
is None
)?
Resolves #982