"git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "e72c567cfd18a6e48de0acaeda60896af4bff3fd"
Unverified Commit 0b0c9cfd authored by Toby Boyd's avatar Toby Boyd Committed by GitHub
Browse files

Merge pull request #5665 from tensorflow/fix/quiet_movielens_download

Remove progress indicator from Movielens download
parents 826eea75 ff9ab90b
...@@ -111,12 +111,7 @@ def _download_and_clean(dataset, data_dir): ...@@ -111,12 +111,7 @@ def _download_and_clean(dataset, data_dir):
temp_dir = tempfile.mkdtemp() temp_dir = tempfile.mkdtemp()
try: try:
zip_path = os.path.join(temp_dir, "{}.zip".format(dataset)) zip_path = os.path.join(temp_dir, "{}.zip".format(dataset))
def _progress(count, block_size, total_size): zip_path, _ = urllib.request.urlretrieve(url, zip_path)
sys.stdout.write("\r>> Downloading {} {:.1f}%".format(
zip_path, 100.0 * count * block_size / total_size))
sys.stdout.flush()
zip_path, _ = urllib.request.urlretrieve(url, zip_path, _progress)
statinfo = os.stat(zip_path) statinfo = os.stat(zip_path)
# A new line to clear the carriage return from download progress # A new line to clear the carriage return from download progress
# tf.logging.info is not applicable here # tf.logging.info is not applicable here
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment