Open tramora opened 1 month ago
Le scénario n'est pas minimal
TrainDatabase.HeaderLineUsed true
TrainDatabase.FieldSeparator
TrainDatabase.DatabaseFormatDetector.DetectFileFormat
File format detected: no header line and field separator tabulation
warning: Database format detector ./Labels_from_Adult.txt : one single field has been detected in the file
and a default field separator has been choosen
Ce problème provient probablement de pykhiops, pour une issue déjà identifiée:
Sinon, le DetectFileFormat ne devrait pas échouer dans ce cas, même s'il s'agit d'une heuristique. Dans cet effet de bord, comme la première ligne contient correctement le nom de l'unique champs natif du dictionnaire, on devrait reconnaitre correctement qu'il y a une ligne d'entête.
Amélioration à considérer également:
Dans le scénario scenario_with_sorting.kh, une ligne d'entête est explicitement spécifée pour la table en sortie
(cf. TargetDataTable.HeaderLineUsed true
).
Il est possible de spécifier que l'on ne veut pas de ligne d'entête en sortie.
Problème probablement lié à l'utilisation de la fonction sort_data_table
de pykhiops, dont le paramètre optionnel output_header_line
est à true par défaut.
Cf. https://khiopsml.github.io/khiops-python/core/generated/khiops.core.api.html#khiops.core.api.sort_data_table
Merci pour ta réponse détaillée @marcboulle.
khiops-python se fie déjà sur la précédence du DetectFileFormat
sur HeaderLineUsed
lorsque les 2 sont fournis pour obtenir le comportement attendu mais tu as raison il faut que nous générions des directives non ambiguës pour un lecteur humain. (remarque faite dans khiops-python#208).
Pour résumer dans ce cas précis de defect,
TrainDatabase.HeaderLineUsed
seul est positionné à true -- correction à faire côté khiops-python (plus précisement khiops_api_base)TrainDatabase.DatabaseFormatDetector.DetectFileFormat
) -- correction à faire côté khiops
Description
Our colleague Romain T. raised the issue on automl a few weeks ago. After a few recent tests it seems that the problem is on the khiops side (even on the today latest stable
10.2.2-1
version).On "a multi-tables unsupervised training with only one column root table : khiops assumes wrongly the additional table has no header line" and treats this line as data even if the HeaderLineUsed flag is set to true (cf
minimal_scenario.kh
)It makes the data preparation fail.
Extract of the error logs :
Workaround 1 (Thierry)
The first obvious workourand I found is to manually remove the header lines on BOTH the root table and the additional table (removing it on the additional table only is not enough)
Workaround 2 (Romain)
Romain proposed another strange workaround that works :
Question about sorting
If sorting steps are inserted before the training one (cf
scenario_with_sorting.kh
), the header line is systematically written by khiops in the sorted file and this "breaks" the workaround 1.Context
10.2.2-1
khiops -e log.txt
) : extract provided abovemininal_scenario.kh
,scenario_with_sorting.kh
(files.zip)khiops -s
) :Linux/Ubuntu/20.04/Focal
Thanks in advance for your explanation and the possible fixes !