epfml / powersgd

Practical low-rank gradient compression for distributed optimization: https://arxiv.org/abs/1905.13727

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Information on Timer Class

vineeths96 opened this issue · comments

I have a question regarding the implementation of the Timer class. In the line here, it is said that if the verbosity level is high the time is not measured. But in many places, like here, the time is measured and displayed in the final output.

What am I missing here?

Hello,

What's your setting for config["log_verbosity"]?

timer = Timer(verbosity_level=config["log_verbosity"], log_fn=metric)

The idea is that timing measurements like

with self.timer("reduce.norms", verbosity=2):

are active when this global setting log_verbosity is at least as high as the verbosity value of the timer.

The value of config["log_verbosity"] is 2. For some reason, I believed that self.verbosity_level was 1. It was a mistake on my end.
Thank you for the clarification.