DiGyt commited on
Commit
db2a08d
1 Parent(s): e74a30b

tqdm update freq to MB

Browse files
Files changed (1) hide show
  1. ecoset.py +1 -1
ecoset.py CHANGED
@@ -162,7 +162,7 @@ class Ecoset(datasets.GeneratorBasedBuilder):
162
  if not op.exists(zip_path):
163
  s3 = boto3.client(urlinfo.scheme, config=Config(signature_version=UNSIGNED))
164
  object_size = s3.head_object(Bucket=urlinfo.netloc, Key=urlinfo.path[1:])["ContentLength"]
165
- with tqdm(total=object_size, unit="B", unit_scale=True, desc="Downloading ecoset") as pbar:
166
  s3.download_file(Bucket=urlinfo.netloc, Key=urlinfo.path[1:], Filename=zip_path,
167
  Callback=lambda bytes_transferred: pbar.update(bytes_transferred))
168
  # unzip using platform-based subprocess
 
162
  if not op.exists(zip_path):
163
  s3 = boto3.client(urlinfo.scheme, config=Config(signature_version=UNSIGNED))
164
  object_size = s3.head_object(Bucket=urlinfo.netloc, Key=urlinfo.path[1:])["ContentLength"]
165
+ with tqdm(total=object_size, unit="MB", unit_scale=True, desc="Downloading ecoset") as pbar:
166
  s3.download_file(Bucket=urlinfo.netloc, Key=urlinfo.path[1:], Filename=zip_path,
167
  Callback=lambda bytes_transferred: pbar.update(bytes_transferred))
168
  # unzip using platform-based subprocess