zhanghang1989 / zhanghang1989/PyTorch-Encoding
Question about DataParallelModel - too many values to unpack
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2k
- Forks
- 448
- PR merge metrics
- No merged PRs in 30d
Description
Dear HangZhang,
Thanks for your code! I was working on a multi-GPU version of my code, which is like:
model = CDCK2(xxx)
model = encoding.parallel.DataParallelModel(model).cuda()
The model is something like h, z=model(x).
While running the model using encoding.parallel.DataParallelModel, it gives me an error of "too many values to unpack". I believe the error must be that the model returns multiple output from different GPUs. I'm not very familiar of data parallelism. Could you please share some hints on how to fix this?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting encoding.parallel.DataParallelModel and the CDCK2 call that returns h and z. Reproduce the multi-GPU run and determine how the returned values are unpacked; done would mean the model runs without the reported “too many values to unpack” error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- distributed-systems, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100