Pytorch-lightning: metrics.classification.ConfusionMatrix() not available

Created on 28 Nov 2020  ·  2Comments  ·  Source: PyTorchLightning/pytorch-lightning

🐛 Bug

The ConfusionMatrix class called from metrics.classification.ConfusionMatrix is not working. When trying to import class it fails.

To fix issue the __init__.py file of the metrics module needs to include a comma following the ConfusionMatrix line like so

  from pytorch_lightning.metrics.classification import (                               
      Accuracy,                                                                        
      Precision,                                                                       
      Recall,                                                                          
      FBeta,                                                                           
      F1,                                                                              
     ConfusionMatrix,                                                                 
  )             

This issue occurs on the latest versions of pytorch_lightning.

Metrics help wanted question

Most helpful comment

In the latest stable versions of pytorch lightning (1.0.8), there is no class interface of ConfusionMatrix yet.
It will be landed on 1.1 release. If you want to use it now, please install from master.
pip install git+https://github.com/PyTorchLightning/pytorch-lightning.git@master -U

All 2 comments

Hi! thanks for your contribution!, great first issue!

In the latest stable versions of pytorch lightning (1.0.8), there is no class interface of ConfusionMatrix yet.
It will be landed on 1.1 release. If you want to use it now, please install from master.
pip install git+https://github.com/PyTorchLightning/pytorch-lightning.git@master -U

Was this page helpful?
0 / 5 - 0 ratings

Related issues

as754770178 picture as754770178  ·  3Comments

edenlightning picture edenlightning  ·  3Comments

mmsamiei picture mmsamiei  ·  3Comments

monney picture monney  ·  3Comments

baeseongsu picture baeseongsu  ·  3Comments