alibaba / pipcook

Machine learning platform for Web developers

Home Page:https://alibaba.github.io/pipcook/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pipcook run error: socket.timeout: The read operation timed out when download torch

AnselDai opened this issue · comments

@AnselDai You could append a mirror parameter --tuna to avoid this error.

I use --tuna parameter but the problem still exist. Can i specify the source when download torch?

Sorry @AnselDai, current Pipcook don't have the ability to specify it in the user interface, but we config the index page at https://github.com/alibaba/pipcook/blob/master/packages/cli/src/config.ts#L9, could you please try to change that at your local machine(/usr/local/lib/node_modules/@pipcook/pipcook-cli/lib/config.js)?

And could you please provide the followings:

  • logs
  • macOS or Linux
  • Node.js version
  • the country where your PC is located

Thank you!

root@instance-pppo0843:~/myfile/pipcook_demo# pipcook run pipeline.json --tuna
✔ plugin @pipcook/plugins-object-detection-pascalvoc-data-collect@1.1.0 has already been installed
✔ plugin @pipcook/plugins-coco-data-access@1.1.1 has already been installed
ℹ PYTHON: Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
ℹ PYTHON: Collecting git+https://gitee.com/pipcook/detectron2.git (from -r /root/.pipcook/plugins/conda_envs/@pipcook/plugins-detectron-fasterrcnn-model-define@1.1.0/requirements.txt (line 6))
ℹ PYTHON: Cloning https://gitee.com/pipcook/detectron2.git to /tmp/pip-req-build-kki_8eby
⚠ NODE: npm WARN plugins@1.0.0 No description
⚠ NODE: npm WARN plugins@1.0.0 No repository field.
⚠ NODE:
ℹ NODE: + @pipcook/plugins-detectron-fasterrcnn-model-define@1.1.0
ℹ NODE: added 2 packages and audited 150 packages in 5.138s
ℹ NODE:
ℹ NODE: 3 packages are looking for funding
ℹ NODE: run npm fund for details
ℹ NODE:
ℹ NODE: found 0 vulnerabilities
ℹ NODE:
ℹ PYTHON: Complete output from command python setup.py egg_info:
ℹ PYTHON: Collecting torch==1.4.0
ℹ PYTHON: Downloading https://files.pythonhosted.org/packages/1a/3b/fa92ece1e58a6a48ec598bab327f39d69808133e5b2fb33002ca754e381e/torch-1.4.0-cp37-cp37m-manylinux1_x86_64.whl (753.4MB)
ℹ PYTHON: Exception:
ℹ PYTHON: Traceback (most recent call last):
ℹ PYTHON: File "/root/.pipcook/plugins/conda_envs/@pipcook/plugins-detectron-fasterrcnn-model-define@1.1.0/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 360, in _error_catcher
ℹ PYTHON: yield
ℹ PYTHON: File "/root/.pipcook/plugins/conda_envs/@pipcook/plugins-detectron-fasterrcnn-model-define@1.1.0/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 442, in read
ℹ PYTHON: data = self._fp.read(amt)
ℹ PYTHON: File "/root/.pipcook/plugins/conda_envs/@pipcook/plugins-detectron-fasterrcnn-model-define@1.1.0/lib/python3.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read
ℹ PYTHON: data = self.__fp.read(amt)
ℹ PYTHON: File "/root/.pipcook/server/node_modules/@pipcook/boa/.miniconda/lib/python3.7/http/client.py", line 457, in read
ℹ PYTHON: n = self.readinto(b)
ℹ PYTHON: File "/root/.pipcook/server/node_modules/@pipcook/boa/.miniconda/lib/python3.7/http/client.py", line 501, in readinto
ℹ PYTHON: n = self.fp.readinto(b)
ℹ PYTHON: File "/root/.pipcook/server/node_modules/@pipcook/boa/.miniconda/lib/python3.7/socket.py", line 589, in readinto
ℹ PYTHON: return self._sock.recv_into(b)
ℹ PYTHON: File "/root/.pipcook/server/node_modules/@pipcook/boa/.miniconda/lib/python3.7/ssl.py", line 1071, in recv_into
ℹ PYTHON: return self.read(nbytes, buffer)
ℹ PYTHON: File "/root/.pipcook/server/node_modules/@pipcook/boa/.miniconda/lib/python3.7/ssl.py", line 929, in read
ℹ PYTHON: return self._sslobj.read(len, buffer)
ℹ PYTHON: socket.timeout: The read operation timed out

In Linux

Node 12.18

In China

I use wget to test the link of pytorch, the download speed is really slow if i don't use a VPN.

commented

@AnselDai May I ask you to execute this command in shell?

$ pipcook -v
commented

If the version of daemon is 1.1.2, the bug has been fixed by 1.2.0, please upgrade the daemon:

$ npm install @pipcook/pipcook-cli -g
$ pipcook init --tuna

root@instance-pppo0843:/lib# pipcook -v
Pipcook Tools v1.2.0 /usr/lib/node_modules/@pipcook/pipcook-cli/
Pipcook Daemon v1.2.0 /root/.pipcook/server/node_modules/@pipcook/daemon

I do use --tuna to init pipcook. The registry of npm I change to taobao source. Dose the taobao source bring the problem?

commented

I do use --tuna to init pipcook. The registry of npm I change to taobao source. Dose the taobao source bring the problem?

It looks like the detectron2 package depends on the torch, and install it without the tuna flag.

I follow the guide to train the model. How can I fix it if I don't use a VPN?

It seems like pipcook use conda to create a virtual env for each plugins, so the torch installed on my machine doesn't work.

It seems like pipcook use conda to create a virtual env for each plugins, so the torch installed on my machine doesn't work.

A temporary workaround is to manually download the whl file and store it under ~/.cache/pip
This way pip will look for the cache first instead of downloading it directly.

It doesn't work. I put torch file both under ~/.cache/pip and ~/.pipcook/plugins/.pip, but it still try to download it from the web

Confirmed this is a bug at our detectron2 repository which doesn't use the specific index mirror to download.

commented

This issue has been fixed by #586 .