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.

Icevision records metrics as a dict; in fastai, a scalar would provide better integration

See original GitHub issue

In FastAI, various callbacks can access and use recorded metrics. For example, the SaveModelCallback can save the model in the case that it is better than the previous best. It looks a the values in the learner’s recorder for this information (learn.recorder.values). Normally, it expects to see a scalar value, but icevision appears to stash a dict there.

For example, when using the cocometrics, learn.recorder.values[0][2] is a dict with a single key - {‘mAPI’ : 0.1234}. If the metrics were stashed directly, then the additional machinery would work. This would require a little additional adaptation to provide the metric name as well.

This callback can be used as-is, but only with valid_loss, training_loss rather than the metric (which is better aligned with the model’s task performance).

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
FraPochetticommented, Dec 6, 2020

As discussed on Discord, I think this would be a better match for me right now! Just for sake of clarity, I will unassign myself.

0reactions
FraPochetticommented, Dec 19, 2021

Ok, will keep this open then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use SaveModelCallback with Custom Metrics? - fastai
Trying to use IceVision together with FastAI for my object detection project using labeled bounding boxes. IceVision has a COCOMetric ...
Read more >
Getting Started with Object Detection using IceVision
IceVision provides metric classes that work across the engines and libraries. The same metrics can be used for both fastai and pytorch lightning....
Read more >
Best-of Machine Learning with Python - JAX - Model Zoo
All projects are ranked by a project-quality score, which is calculated based on various metrics automatically collected from GitHub and different package ...
Read more >
Building an Object Detection Model with FastAI and IceVision
We can also have a look at some records after applying these transformations. We have prepared our final dataset. I chose YOLOv5 for...
Read more >
Utilizing the `timm` Library Inside of `fastai` (Intermediate)
However as the field of Machine Learning keeps going, new and fresh architectures are introduced. Wouldn't it be nice if it were easy...
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