DiGyt commited on
Commit
6ac906f
1 Parent(s): c202e36

Added params to filesize request

Browse files
Files changed (1) hide show
  1. ecoset.py +1 -1
ecoset.py CHANGED
@@ -161,7 +161,7 @@ class Ecoset(datasets.GeneratorBasedBuilder):
161
  zip_path = op.join(target_dir, "ecoset.zip")
162
  if not op.exists(zip_path):
163
  s3 = boto3.client(urlinfo.scheme, config=Config(signature_version=UNSIGNED))
164
- object_size = s3.head_object()["ContentLength"]
165
  with tqdm.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))
 
161
  zip_path = op.join(target_dir, "ecoset.zip")
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.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))