diff --git a/dvc/remote/base.py b/dvc/remote/base.py index e355f63c6..b73e24b89 100644 --- a/dvc/remote/base.py +++ b/dvc/remote/base.py @@ -151,16 +151,16 @@ class RemoteBASE(object): tasks = executor.map(self.get_file_checksum, file_infos) if len(file_infos) > LARGE_DIR_SIZE: - msg = ( - "Computing md5 for a large number of files. " - "This is only done once." + logger.info( + ( + "Computing md5 for a large number of files. " + "This is only done once." + ) ) - logger.info(msg) - - tasks = Tqdm(tasks, total=len(file_infos), unit="md5") - checksums = { - file_infos[index]: task for index, task in enumerate(tasks) - } + tasks = Tqdm(tasks, total=len(file_infos), unit="md5") + checksums = { + file_infos[index]: task for index, task in enumerate(tasks) + } return checksums def _collect_dir(self, path_info): diff --git a/dvc/remote/http.py b/dvc/remote/http.py index 2a8f378b9..4373fe788 100644 --- a/dvc/remote/http.py +++ b/dvc/remote/http.py @@ -44,7 +44,8 @@ class RemoteHTTP(RemoteBASE): fd.flush() pbar.update(len(chunk)) # print completed progress bar for large file sizes - if (total or pbar.n) > LARGE_FILE_SIZE: + pbar.n = total or pbar.n + if pbar.n > LARGE_FILE_SIZE: Tqdm.write(str(pbar)) def exists(self, path_info):