question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EpochMetric signature check caused error

See original GitHub issue

🐛 Bug description

I tried to re-implement the ROC_AUC like the one in contrib.metrics.roc_auc, and passed some extra kwarg options to support for multiclass and multilabel classification. However, when I run my code, an Error "Number of classes in y_true not equal to the number of columns in ‘y_score’ " was raised by scikit-learn. I checked the y_true of the whole epoch, and the number of unique values was equal to the number of columns of y_score. Next, I checked the source code of EpochMetric, and found that in update function, it tried to execute the compute_fn at the first iteration. I supposed this was the cause: the y_true of a single batch might not contain all the classes of the dataset, therefore scikit-learn would throws the error mentioned above. The same problem occured for AveragePrecision.

Environment

  • PyTorch Version (e.g., 1.5): 1.5
  • Ignite Version (e.g., 0.3.0): 0.3.0
  • OS (e.g., Linux): Ubuntu 18.04
  • How you installed Ignite (conda, pip, source): pip
  • Python version: 3.7.6
  • Any other relevant information: None

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
vfdev-5commented, Jun 19, 2020

@sandylaker sorry for delay with the issue. We just merged a PR that should introduce the argument as discussed here. This functionality will be available in nightly in 12h and in stable 0.4.0 in 1.5-2 weeks.

1reaction
vfdev-5commented, Jun 11, 2020

OK, I could reproduce the warning. Anyway, let’s introduce an argument to disable this check. By default, it is True (run checking). Such that if user knows what he/she is doing, can disable it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ignite/epoch_metric.py at master · pytorch/ignite - GitHub
This can potentially lead to a memory error if the input data is larger than available RAM. ... Check once the signature and...
Read more >
EpochMetric — PyTorch-Ignite v0.4.10 Documentation
This can potentially lead to a memory error if the input data is larger than ... compute_fn (Callable) – a callable with the...
Read more >
1.0.2 PDF - PyTorch Lightning Documentation
In this guide we'll show you how to organize your PyTorch code into Lightning in 2 steps. Organizing your code with PyTorch Lightning...
Read more >
Verification Of File Signature Failed For File - YouTube
More details at https://patchmypc.com/ verification -of-file- signature -failedIn this video, we will cover how to work around a common issue ...
Read more >
Horse or Human F1 score=100% | Kaggle
Make Predictions on Test Set and Create Confusion Matrix and ... if the current epoch's metric value did not improve, the weights for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found