I was going through the TorchServe documentation 3 for logging custom metrics but I’m not sure I fully understand it, especially the use of Dimension class. What exactly is its purpose?
Can someone please explain with a short toy example? Let’s say I’m serving a classification example and I want to log 2 things -

Probability of the predicted class
Probability of the top 5 predicted classes.

How can I do it? Thanks a lot!