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
{{ message }}
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
When I look into the folder, one files exist, the *.lock file , and the python script only create the *.lock file and it is always 0 byte:
-rw-r--r-- 1 moseswong staff 0 Oct 2 12:22 ssd_512_mobilenet1.0_voc-37c18076.lock
...
I tried to pre-load the file ssd_512_mobilenet1.0_voc-37c18076.zip into the download folder (which is "." as specifiy in get_model method), and run the python script again and it still stuck. In this setting the python script should not even try to download but the fact is not only it try to download and it stuck at downloading again.
When I look into the folder, two files exist, the *.zip and *.lock , the *.zip file is not from the python script but manually, and the python script only create the *.lock file and it is always 0 byte.
-rw-r--r-- 1 moseswong staff 0 Oct 2 12:22 ssd_512_mobilenet1.0_voc-37c18076.lock
-rw-r--r--@ 1 moseswong staff 51421665 Oct 2 12:32 ssd_512_mobilenet1.0_voc-37c18076.zip
...
I tried many times.
In summary, it is found that not only it get stuck when there is no model file, it get stuck even when the model file exist.
UPDATE:
After leaving it run for a few hours the following error appears, looks like network error !!!??? If it is network error why I use a browser to download the zip file with the URL takes only 2 minutes --- https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/models/ssd_512_mobilenet1.0_voc-37c18076.zip. And this same Python script runs perfectly on another computer (Windows 10) connects to the Internet through the same router.
Model file not found. Downloading.
Downloading ./ssd_512_mobilenet1.0_voc-37c18076.zip from https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/models/ssd_512_mobilenet1.0_voc-37c18076.zip...
65%|######4 | 32400/50216 [06:01<03:18, 89.73KB/s]
Traceback (most recent call last):
File "cvisionc.py", line 92, in
net = gcv.model_zoo.get_model('ssd_512_mobilenet1.0_voc', pretrained=True, root='.')
File "/Users/moseswong/opt/anaconda3/envs/mx4/lib/python3.6/site-packages/gluoncv/model_zoo/model_zoo.py", line 403, in get_model
net = _modelsname
File "/Users/moseswong/opt/anaconda3/envs/mx4/lib/python3.6/site-packages/gluoncv/model_zoo/ssd/presets.py", line 544, in ssd_512_mobilenet1_0_voc
pretrained_base=pretrained_base, **kwargs)
File "/Users/moseswong/opt/anaconda3/envs/mx4/lib/python3.6/site-packages/gluoncv/model_zoo/ssd/ssd.py", line 420, in get_ssd
net.load_parameters(get_model_file(full_name, tag=pretrained, root=root), ctx=ctx)
File "/Users/moseswong/opt/anaconda3/envs/mx4/lib/python3.6/site-packages/gluoncv/model_zoo/model_store.py", line 293, in get_model_file
with zipfile.ZipFile(zip_file_path) as zf:
File "/Users/moseswong/opt/anaconda3/envs/mx4/lib/python3.6/zipfile.py", line 1131, in init
self._RealGetContents()
File "/Users/moseswong/opt/anaconda3/envs/mx4/lib/python3.6/zipfile.py", line 1198, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
moseswmwong
changed the title
Gluon-cv cannot down model file with model_zoo.get_model
Gluon-cv cannot download model file with model_zoo.get_model
Oct 2, 2020
UPDATE: I switched network for my MacBook Pro from the problem network to another network (4G smartphone share from my iPhone) and the model downloaded instantly! Furthermore, after that, I switch back to the originally problematic network and there is no problem with the download the model file also download instantly via this previously problematic network.
I am not close the case. As it means somewhere get stuck, OS? Cloud?
As a matter of fact, first time deployment of Mxnet code on MacOS using gcv.model_zoo.get_model() stuck on its first installation attempt, then it means the installation by end user will always fail. As we are working to deploy the code as new product to customer locations, this means MacOS installation a total failure if we depend on download approach. Note, asking customers to switch to alternate network and return to the original is not a acceptable workaround for naïve end users.
szha
changed the title
Gluon-cv cannot download model file with model_zoo.get_model
Add progress bar to Gluon download function (was: Gluon-cv cannot download model file with model_zoo.get_model)
Oct 3, 2020
Description
On MacOS, my python code is:
The problem is when I run it download fail, it get stuck at the following, not having any progress for a long time:
Model file not found. Downloading.
Downloading ./ssd_512_mobilenet1.0_voc-37c18076.zip from https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/models/ssd_512_mobilenet1.0_voc-37c18076.zip...
When I look into the folder, one files exist, the *.lock file , and the python script only create the *.lock file and it is always 0 byte:
I tried to pre-load the file ssd_512_mobilenet1.0_voc-37c18076.zip into the download folder (which is "." as specifiy in get_model method), and run the python script again and it still stuck. In this setting the python script should not even try to download but the fact is not only it try to download and it stuck at downloading again.
When I look into the folder, two files exist, the *.zip and *.lock , the *.zip file is not from the python script but manually, and the python script only create the *.lock file and it is always 0 byte.
I tried many times.
In summary, it is found that not only it get stuck when there is no model file, it get stuck even when the model file exist.
UPDATE:
After leaving it run for a few hours the following error appears, looks like network error !!!??? If it is network error why I use a browser to download the zip file with the URL takes only 2 minutes --- https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/models/ssd_512_mobilenet1.0_voc-37c18076.zip. And this same Python script runs perfectly on another computer (Windows 10) connects to the Internet through the same router.
Model file not found. Downloading.
Downloading ./ssd_512_mobilenet1.0_voc-37c18076.zip from https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/models/ssd_512_mobilenet1.0_voc-37c18076.zip...
65%|######4 | 32400/50216 [06:01<03:18, 89.73KB/s]
Traceback (most recent call last):
File "cvisionc.py", line 92, in
net = gcv.model_zoo.get_model('ssd_512_mobilenet1.0_voc', pretrained=True, root='.')
File "/Users/moseswong/opt/anaconda3/envs/mx4/lib/python3.6/site-packages/gluoncv/model_zoo/model_zoo.py", line 403, in get_model
net = _modelsname
File "/Users/moseswong/opt/anaconda3/envs/mx4/lib/python3.6/site-packages/gluoncv/model_zoo/ssd/presets.py", line 544, in ssd_512_mobilenet1_0_voc
pretrained_base=pretrained_base, **kwargs)
File "/Users/moseswong/opt/anaconda3/envs/mx4/lib/python3.6/site-packages/gluoncv/model_zoo/ssd/ssd.py", line 420, in get_ssd
net.load_parameters(get_model_file(full_name, tag=pretrained, root=root), ctx=ctx)
File "/Users/moseswong/opt/anaconda3/envs/mx4/lib/python3.6/site-packages/gluoncv/model_zoo/model_store.py", line 293, in get_model_file
with zipfile.ZipFile(zip_file_path) as zf:
File "/Users/moseswong/opt/anaconda3/envs/mx4/lib/python3.6/zipfile.py", line 1131, in init
self._RealGetContents()
File "/Users/moseswong/opt/anaconda3/envs/mx4/lib/python3.6/zipfile.py", line 1198, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
Error Message
Model file not found. Downloading.
Downloading ./ssd_512_mobilenet1.0_voc-37c18076.zip from https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/models/ssd_512_mobilenet1.0_voc-37c18076.zip...
Steps to reproduce
run python script
What have you tried to solve it?
net = gcv.model_zoo.ssd_512_mobilenet1_0_voc(pretrained=True, pretrained_base=False)
Environment
We recommend using our script for collecting the diagnositc information. Run the following command and paste the outputs below:
The text was updated successfully, but these errors were encountered: