You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a user, I want to be able to update the sdtype of any column, even if they're involved in a multi-column transformer. If I do so, the config should still be valid..
Expected behavior
update_sdtypes
If you update an sdtype of a column in a multi-column transformer, and the new sdtype is no longer compatible with the transformer then:
show a warning
REMOVE it from the transformer
Choose a new, compatible transformer instead.
# before>>>ht.get_config()
{
'sdtypes': {
'A': 'city',
'B': 'state',
'C': 'country'
},
'transformers': {
('A', 'B', 'C'): address.RandomLocationGenerator()
}
}
# updating to an incompatible sdtype for the RandomLocationGenerator>>>ht.update_sdtypes(column_name_to_sdtype={
'A': 'phone_number',
'B': 'categorical'
})
Warning: sdtype'phone_number'isincompatiblewithtransformer'RandomLocationGenerator'. Assigninganewtransformertoit.
Warning: sdtype'categorical'isincompatiblewithtransformer'RandomLocationGenerator'. Assigninganewtransformertoit.
>>>ht.get_config()
{
'sdtypes': {
'A': 'phone_number',
'B': 'state',
'C': 'country'
},
'transformers': {
'A': phone_number.AnonymizedGeoExtractor(),
'B': UniformEncoder()
('C'): address.RandomLocationGenerator()
}
}
# edge case: If there is only column in it, then replace the transformer entirely>>>ht.get_config()
{
'sdtypes': {
'D': 'city',
},
'transformers': {
('D'): RandomLocationGenerator()
}
}
# updating to invalid sdtype for the RandomLocationGenerator>>>ht.update_sdtypes(column_name_to_sdtype={
'D': 'phone_number'
})
Warning: sdtype'phone_number'isincompatiblewithtransformer'RandomLocationGenerator'. Assigninganewtransformertoit.
>>>ht.get_config()
{
'sdtypes': {
'D': 'phone_number'
},
'transformers': {
'D': phone_number.AnonymizedGeoExtractor()
}
}
The text was updated successfully, but these errors were encountered:
Problem Description
As a user, I want to be able to update the
sdtype
of any column, even if they're involved in a multi-column transformer. If I do so, the config should still be valid..Expected behavior
update_sdtypes
If you update an sdtype of a column in a multi-column transformer, and the new sdtype is no longer compatible with the transformer then:
The text was updated successfully, but these errors were encountered: