MCPcopy Create free account
hub / github.com/CSAILVision/gandissect / post_progress

Function post_progress

netdissect/progress.py:50–58  ·  view source on GitHub ↗

When within a progress loop, post_progress(k=str) will display the given k=str status on the right-hand-side of the progress status bar. If not within a visible progress bar, does nothing.

(**kwargs)

Source from the content-addressed store, hash-verified

48 return hasattr(tqdm, '_instances') and len(tqdm._instances) > 0
49
50def post_progress(**kwargs):
51 '''
52 When within a progress loop, post_progress(k=str) will display
53 the given k=str status on the right-hand-side of the progress
54 status bar. If not within a visible progress bar, does nothing.
55 '''
56 if nested_tqdm():
57 innermost = max(tqdm._instances, key=lambda x: x.pos)
58 innermost.set_postfix(**kwargs)
59
60def desc_progress(desc):
61 '''

Callers 2

train_ablationFunction · 0.90
mainFunction · 0.90

Calls 1

nested_tqdmFunction · 0.85

Tested by

no test coverage detected