sberbank-ai-lab/LightAutoML

ReportDeco does not work on all the AutoML objects

rozlana-g opened this issue · 2 comments

I can not wrap AutoML from the tutorial into ReportDeco wrapper in Tutorial 3.

After

automl = AutoML(reader=reader, levels=[
    [gbm_lvl0, reg_lvl0]
], timer=timer, blender=blender, skip_conn=False)

adding

from lightautoml.report import ReportDeco
RD = ReportDeco(output_path='./binary_report/')
automl = RD(automl)

gives error

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-22-7df350cbcb2a> in <module>()
      1 from lightautoml.report import ReportDeco
      2 RD = ReportDeco(output_path='./binary_report/')
----> 3 automl = RD(automl)

/usr/local/lib/python3.7/dist-packages/lightautoml/report/report_deco.py in __call__(self, model)
    375 
    376         # AutoML only
--> 377         self.task = self._model.task._name  # valid_task_names = ['binary', 'reg', 'multiclass']
    378 
    379         # add informataion to report

AttributeError: 'AutoML' object has no attribute 'task'

Looks like ReportDeco works only with tabular preset.

VaBun commented

Hi, @rozlana-g,

Thank you for detailed description of the problem. ReportDeco now works with base class AutoML. The corrected version is already available on GitHub, and soon will be added to pip.

Hi @rozlana-g,

I hope that everything should be alright and we are going with these changes from @VaBun to create new version for pip. If something goes wrong - please reopen this issue.

Alex