idealo / imageatm

Image classification for everyone.
https://idealo.github.io/imageatm/
Apache License 2.0
214 stars 49 forks source link

Evaluation report as jupyter notebook fails in cell 7 #36

Open drosin opened 4 years ago

drosin commented 4 years ago

The following error appears when generating the evaluation report as jupyter notebook:

papermill.exceptions.PapermillExecutionError:
---------------------------------------------------------------------------
Exception encountered at "In [7]":
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-7-a62122680ff8> in <module>
----> 1 e._plot_classification_report(figsize=[max(5,e.n_classes*0.5), max(8,e.n_classes*0.8)])

AttributeError: 'Evaluation' object has no attribute '_plot_classification_report'

This is my config.yml:

evaluate:
  run: True
  report:
    create: True
    kernel_name: imageatm
    export_html: True
    export_pdf: False
hyun1014 commented 4 years ago

Hi. I also found the error and I looked at past commit history. Through commit on 24 Oct 2019(#21: classification report in ascii-style), _plot_classification_report attribute was deprecated. You must change code in evaluation_template.ipynb to use _print_classification_report() instead of _plot_classification_report(). It is also possible to copy _plot_classification_report() content from past commit and paste it into evaluate.py in your package. Then the attribute above will work well.