shenweichen / shenweichen/DeepCTR-Torch
TensorDataset with DataLoader could lead bad performance
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 733
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug(问题描述)
TensorDataset with DataLoader will lead to slow data reading. Use simple tensor slicing could have ~4x speed improvement (especially in large batch size).
Additional context
Relative code:
Relative discussion:
Contributor guide
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 at deepctr_torch/models/basemodel.py lines 186-193 and compare the TensorDataset/DataLoader path with the simple tensor-slicing approach described in the issue. Read the linked PyTorch discussion for relevant context, then verify the change with a representative large-batch data-reading benchmark. Done means the affected model path avoids the reported slowdown and shows improved performance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning, performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100