corrected tqdm call
Browse files
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
|
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="B", unit_scale=True, desc=filename) 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
|