Rate This Document
Findability
Accuracy
Completeness
Readability

Failed to Obtain the PyTorch Source Code

Symptom

When obtaining the PyTorch source code, an error is reported stating "unexpected disconnect while reading sideband packet." The details are as follows:

Cloning into 'pytorch'...
remote: Enumerating objects: 13382, done.
remote: Counting objects: 100% (13382/13382), done.
remote: Compressing objects: 100% (11353/11353), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
error: 1504 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

Key Process and Cause Analysis

Code download fails due to network problems.

Conclusion and Solution

Run the command again to obtain the source code.

1
git clone -b v2.1.2 https://github.com/pytorch/pytorch.git --depth 1