sb-ai-lab / LightAutoML

Fast and customizable framework for automatic ML model creation (AutoML)
https://developers.sber.ru/portal/products/lightautoml
Apache License 2.0
1.09k stars 48 forks source link

user care #71

Closed livington closed 1 year ago

livington commented 1 year ago

Friendly user care

dev-rinchin commented 1 year ago

Hi @livington, please describe the problems you have encountered, we will add them to the backlog.

livington commented 1 year ago

Hi!The problem is about unexpectable behavior after solving multiclass task. For example I used TabularUtilizedAutoML and solved multiclass task, so, I had to do next gyms to get correct prediction:

test_pred= automl.predict(test).data.argmax(axis=1)
class_mapping = {v:k for k, v in automl.outer_pipes[0].ml_algos[0].models[0][0].reader.class_mapping.items()}
test_pred = [class_mapping[e] for e in test_pred_age]

Because during training automl, class names were changed. But sometimes (sometimes!) class_mapping is qual None, so code should be:

if automl.outer_pipes[0].ml_algos[0].models[0][0].reader.class_mapping is not None:
    test_pred= automl.predict(test).data.argmax(axis=1)
else:
    class_mapping = {v:k for k, v in automl.outer_pipes[0].ml_algos[0].models[0][0].reader.class_mapping.items()}
    test_pred = [class_mapping[e] for e in automl.predict(test).data.argmax(axis=1)]

So,my pull request was about care of users, and I suggested show (sometimes) them motivating information about solving multiclass task.

dev-rinchin commented 1 year ago

Thanks for your comment, https://github.com/sb-ai-lab/LightAutoML/issues/68 is exactly about that :)