Skip to content

Unable to save additional metrics due to encoding issues #368

@tresoldi

Description

@tresoldi

When the encoding of data (such as feature names) does not match the one of the system (for example, when data is encoded with utf-8 under many Windows systems), additional metrics cannot be saved, raising issues such as:

2021-04-04 15:52:32,312 supervised.utils.additional_metrics ERROR Exception while saving additional metrics. 'charmap' codec can't encode character '\u025b' in position 78: character maps to <undefined>

mljar is smart enough to just skip over the exception, so it is not such a big problem, but it limits usefulness particularly for data exploration.

A fix could be to have the .save_* methods of AdditionalMetrics (supervised/utils/additional_metrics.py) accept an encoding. A "good enough" alternative might be to explicitly add an encoding="utf-8" to all such methods, noting it in the documentation as the default encoding.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions