baal-org / baal

Bayesian active learning library for research and industrial usecases.
https://baal.readthedocs.io
Apache License 2.0
862 stars 86 forks source link

Add metric logging #223

Closed Dref360 closed 2 years ago

Dref360 commented 2 years ago

Summary:

Add some utils to keep track of metrics over time.

This is WIP, but what do you think of this API? It would be quite simple for the users to get a metrics for each dataset size.

We can also add utilities for that such as MetricMixin.get_active_metric(metric_name="precision") : Dict[int, float]

Features:

Fixes #220

Checklist:

parmidaatg commented 2 years ago

I like this. thanks a lot @Dref360. I was only wondering don't you think it is more descriptive to have "active_step" as the key for metrics and have "datasize" as a field ?

GeorgePearse commented 2 years ago

This looks great, will give it a try as soon as it's ready.

Dref360 commented 2 years ago

I like this. thanks a lot @Dref360. I was only wondering don't you think it is more descriptive to have "active_step" as the key for metrics and have "datasize" as a field ?

Good idea, not sure how to keep track of the active step tho. Do you have an idea? Like just a field in ModelWrapper?

Dref360 commented 2 years ago

I think this is ready for review. I added the dataset size in the response of get_metrics.

rafapi commented 2 years ago

Is there an entry in the docs for this? Regardless of that, this looks good!

Dref360 commented 2 years ago

@rafapi just added an example in our documentation.

Dref360 commented 2 years ago

Quick video showcasing the feature. https://www.loom.com/share/4b7d0eeee187463cac12ecd57828c5fe