mirror of
https://github.com/clearml/clearml
synced 2025-01-31 09:07:00 +00:00
Fix for division by zero in model download speed calculation
This commit is contained in:
parent
f7e5f932cd
commit
ce596c0266
@ -66,7 +66,8 @@ class _DownloadProgressReport(object):
|
||||
last_part = self.downloaded_mb - self.last_reported
|
||||
|
||||
if self._verbose or (last_part >= self._report_chunk_size):
|
||||
speed = last_part / (time() - self._tic)
|
||||
time_diff = time() - self._tic
|
||||
speed = (last_part / time_diff) if time_diff != 0 else 0
|
||||
self._tic = time()
|
||||
self.last_reported = self.downloaded_mb
|
||||
self._log.info('Downloading: %.0fMB / %.2fMb @ %.2fMbs from %s' %
|
||||
|
Loading…
Reference in New Issue
Block a user