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
Please indicate the following details about the environment in which you found the bug:
RDT version: 1.0
Python version: 3.8
Operating System: Ubuntu
Error Description
I was trying to convert a pandas dataframe using the hypertransformer obtained from the openml website, however this process gave this error
File "/home/luismatos/.conda/envs/luismatos/lib/python3.8/site-packages/rdt/hyper_transformer.py", line 600, in detect_initial_config
self._learn_config(data)
File "/home/luismatos/.conda/envs/luismatos/lib/python3.8/site-packages/rdt/hyper_transformer.py", line 574, in _learn_config
self._set_field_sdtype(data, field)
File "/home/luismatos/.conda/envs/luismatos/lib/python3.8/site-packages/rdt/hyper_transformer.py", line 559, in _set_field_sdtype
self.field_sdtypes[field] = self._DTYPES_TO_SDTYPES[kind]
KeyError: 'u'
however i was expecting something like the example provided in the github page
Steps to reproduce
import openml
import ast
#sys argument is used write the id of a dataset in the openml website and the target column
print("Running code with dataset:", sys.argv[1])
print("Target column", sys.argv[2])
data = openml.datasets.get_dataset(sys.argv[1])
df = data.get_data()[0]
print(irisdf.info())
ht = HyperTransformer()
ht.detect_initial_config(df)
ht.fit(df)
df = ht.transform(df)
However using the following process:
tipos = irisdf.convert_dtypes().dtypes
listaTipos = [str(i) for i in tipos]
for i in trange(0, len(listaTipos)):
if listaTipos[i] == "UInt8":
cols = tipos.keys()[i]
df[cols] = df[cols].astype(str).astype(int)
it solves the issue! It only happens with the UInt8 (so far as I know).
Thanks for the attention :)
The text was updated successfully, but these errors were encountered:
Environment Details
Please indicate the following details about the environment in which you found the bug:
Error Description
I was trying to convert a pandas dataframe using the hypertransformer obtained from the openml website, however this process gave this error
File "/home/luismatos/.conda/envs/luismatos/lib/python3.8/site-packages/rdt/hyper_transformer.py", line 600, in detect_initial_config
self._learn_config(data)
File "/home/luismatos/.conda/envs/luismatos/lib/python3.8/site-packages/rdt/hyper_transformer.py", line 574, in _learn_config
self._set_field_sdtype(data, field)
File "/home/luismatos/.conda/envs/luismatos/lib/python3.8/site-packages/rdt/hyper_transformer.py", line 559, in _set_field_sdtype
self.field_sdtypes[field] = self._DTYPES_TO_SDTYPES[kind]
KeyError: 'u'
however i was expecting something like the example provided in the github page
Steps to reproduce
However using the following process:
it solves the issue! It only happens with the UInt8 (so far as I know).
Thanks for the attention :)
The text was updated successfully, but these errors were encountered: