You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue Description:
While running the run.py, an error occurred where the file http://212.129.155.247/embedding/elmo_en_Original.zip was not found in the cache. The script attempted to download the file, but only downloaded a portion of it before encountering an error. When attempting to unzip the downloaded file, the script found that it was not a valid zip file and raised a BadZipFile exception.
Steps to reproduce:
Run the run.py script.
Wait until the script attempts to download the file http://212.129.155.247/embedding/elmo_en_Original.zip.
The error occurs when attempting to unzip the downloaded file.
Error Message:
build dataset: 100% 9/9 [00:00<00:00, 53468.46it/s]
build dataset: 100% 9/9 [00:00<00:00, 69647.11it/s]
http://212.129.155.247/embedding/elmo_en_Original.zip not found in cache, downloading to /tmp/tmpdw911a4u
47% 163M/347M [1:29:31<1:41:31, 30.3kB/s]
Finish download from http://212.129.155.247/embedding/elmo_en_Original.zip
File is not a zip file
Traceback (most recent call last):
File "/content/SANER/train_bert_elmo_en.py", line 150, in <module>
data_bundle, embed, train_feature_data, dev_feature_data, test_feature_data, feature2id, id2feature = load_data()
File "/content/SANER/fastNLP/core/utils.py", line 155, in wrapper
results = func(*args, **kwargs)
File "/content/SANER/train_bert_elmo_en.py", line 139, in load_data
embed = ElmoEmbedding(vocab=data.get_vocab('chars'), model_dir_or_name=elmo_model, layers='mix', requires_grad=False,
File "/content/SANER/fastNLP/embeddings/elmo_embedding.py", line 70, in __init__
model_dir = cached_path(model_url, name='embedding')
File "/content/SANER/fastNLP/io/file_utils.py", line 171, in cached_path
return get_from_cache(url_or_filename, Path(data_cache))
File "/content/SANER/fastNLP/io/file_utils.py", line 425, in get_from_cache
raise e
File "/content/SANER/fastNLP/io/file_utils.py", line 396, in get_from_cache
unzip_file(Path(temp_filename), Path(uncompress_temp_dir))
File "/content/SANER/fastNLP/io/file_utils.py", line 448, in unzip_file
with ZipFile(file, "r") as zipObj:
File "/usr/lib/python3.9/zipfile.py", line 1266, in __init__
self._RealGetContents()
File "/usr/lib/python3.9/zipfile.py", line 1333, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file```
**Note:** the download of the file `elmo_en_Original.zip` from `http://212.129.155.247/embedding/elmo_en_Original.zip` takes too much time even with good internet speed, which may corrupted the file. (The averge download speed is `20KB/s`)
The text was updated successfully, but these errors were encountered:
Issue Description:
While running the
run.py
, an error occurred where the filehttp://212.129.155.247/embedding/elmo_en_Original.zip
was not found in the cache. The script attempted to download the file, but only downloaded a portion of it before encountering an error. When attempting to unzip the downloaded file, the script found that it was not a valid zip file and raised aBadZipFile
exception.Steps to reproduce:
Run the
run.py
script.Wait until the script attempts to download the file
http://212.129.155.247/embedding/elmo_en_Original.zip
.The error occurs when attempting to unzip the downloaded file.
Error Message:
The text was updated successfully, but these errors were encountered: