MCPcopy Create free account
hub / github.com/pytorch/pytorch / progressBar

Function progressBar

caffe2/python/models/download.py:43–47  ·  view source on GitHub ↗
(percentage)

Source from the content-addressed store, hash-verified

41
42
43def progressBar(percentage):
44 full = int(DOWNLOAD_COLUMNS * percentage / 100)
45 bar = full * "#" + (DOWNLOAD_COLUMNS - full) * " "
46 sys.stdout.write(u"\u001b[1000D[" + bar + "] " + str(percentage) + "%")
47 sys.stdout.flush()
48
49
50def downloadFromURLToFile(url, filename, show_progress=True):

Callers 1

downloadFromURLToFileFunction · 0.85

Calls 2

writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…