Giter VIP home page Giter VIP logo

Comments (6)

vlomonaco avatar vlomonaco commented on July 28, 2024

Yes, that would be ideal!

from avalanche.

AntonioCarta avatar AntonioCarta commented on July 28, 2024

Actually, it was more of a question than a proposal. I still don't have a clear idea on how to solve this problem.

from avalanche.

vlomonaco avatar vlomonaco commented on July 28, 2024

I think the EvalProtocol job should be exactly what you said:

I would prefer a generic EvalProtocol that controls printing and logging and only delegates the computations to the metrics (e.g. instead of printing inside compute EvalProtocol calls the str method). I would also prefer to be able to choose where to print the metrics (output file, tensorboard, stdout).

As for the metrics, as soon as we have all the the metrics implemented we can define an unique signature for the compute method... let's wait a little on this!

from avalanche.

akshitac8 avatar akshitac8 commented on July 28, 2024

@vlomonaco Can I work on this and also it would be helpful if you could suggest some initial metrics that are needed and also is issue #51 solved?

from avalanche.

AntonioCarta avatar AntonioCarta commented on July 28, 2024

#51 is closed.

Regarding the Metrics, maybe we can use Flows to define how and when to compute each metric? The problem that we have right now is that each metrics requires different computations and arguments. This could be easily solved with a callback system, like the flows used for training and test.

Take as an example the memory usage MU. It should be printed only once, instead it is printed everywhere because the EvaluationProtocol does not know how to print it:

Training completed
Computing accuracy on the whole test set
Task 0 - CF: 0.0000
Train Task 0 - MU: 0.259 GB
Confusion matrix, without normalization
[Evaluation] Task 0: Avg Loss 0.002227343698385049; Avg Acc 0.9242105484008789
Task 0 - CF: 0.9242
Train Task 0 - MU: 0.265 GB
Confusion matrix, without normalization
[Evaluation] Task 0: Avg Loss 0.06294100686298648; Avg Acc 0.0
Task 0 - CF: 0.9242
Train Task 0 - MU: 0.265 GB
Confusion matrix, without normalization
[Evaluation] Task 0: Avg Loss 0.0536595421147698; Avg Acc 0.0
Task 0 - CF: 0.9242
Train Task 0 - MU: 0.268 GB
Confusion matrix, without normalization
[Evaluation] Task 0: Avg Loss 0.05200100937101282; Avg Acc 0.0
Task 0 - CF: 0.9242
Train Task 0 - MU: 0.270 GB
Confusion matrix, without normalization
[Evaluation] Task 0: Avg Loss 0.06933177224355726; Avg Acc 0.0
Start of step  1

Each metric will probably need to implement a couple of methods, while the others will stay empty, so the implementation of new metrics should not be more complex than it is right now.

from avalanche.

vlomonaco avatar vlomonaco commented on July 28, 2024

Hi @AntonioCarta you are totally right. Indeed now the metrics are called through the EvaluationPlugin!

Being it a plugin, it can implement all the callbacks independently from the main strategy (all the plugin methods will be called before the main strategy methods). This also means that the calls he make can be fine-tuned to specific metric needs. Does it make sense or am I missing something?

from avalanche.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.