Back to questions

Counter of attempts in a retry loop

How to count attempts in the retry decorator so that the logs and metrics reflect the real number of calls?

Answer as you would in an interview

Answer aloud or write down a few key points. The text field is optional; the review opens after your attempt.

Loading
Counter of attempts in a retry loop — interview question — ML Mentor