Problem
During MOVA training, tqdm can print two progress records for the same training step, especially when log_interval=1.
Root Cause
pbar.set_postfix(...) uses refresh=True by default, which immediately refreshes the tqdm display.
At the end of the training loop, pbar.update(1) refreshes tqdm again. As a result, each logged step can be printed twice.
Expected Behavior
Each training step should print only one tqdm progress line.
Actual Behavior
The same training step can be printed twice in the tqdm output.
Fix Proposal
Update the tqdm display only once per logging interval:
pbar.set_postfix({
"loss": f"{avg_loss:.4f}",
"v_loss": f"{avg_video_loss:.4f}",
"a_loss": f"{avg_audio_loss:.4f}",
"lr": f"{lr:.2e}",
}, refresh=False)
pbar.update(self.log_interval)
Problem
During MOVA training, tqdm can print two progress records for the same training step, especially when
log_interval=1.Root Cause
pbar.set_postfix(...)usesrefresh=Trueby default, which immediately refreshes the tqdm display.At the end of the training loop,
pbar.update(1)refreshes tqdm again. As a result, each logged step can be printed twice.Expected Behavior
Each training step should print only one tqdm progress line.
Actual Behavior
The same training step can be printed twice in the tqdm output.
Fix Proposal
Update the tqdm display only once per logging interval: