Data Loading aiming-lab-data-loading
Optimize data loading pipeline to prevent GPU starvation.
Use it when setting up DataLoader or data preprocessing.
Works in Claude, ChatGPT, Codex and more
- Our test
- —
- not tested yet
- GitHub stars
- 15k
- aiming-lab/autoresearchclaw
- Added by
- 0
- members
- Updated
- Dec 6
- commit be4ba47
- Content
- 1 file
- no scripts · 1 KB
- License
- MIT
- free to use
What our test found
Not tested yet. Our model tries every skill on a realistic request and scores the result, the most popular skills first. Until then, the safety checks on the right still apply.
name: data-loading description: Optimize data loading pipeline to prevent GPU starvation. Use when setting up DataLoader or data preprocessing. metadata: category: tooling trigger-keywords: "data,loading,dataloader,dataset,preprocessing,augmentation" applicable-stages: "10" priority: "6" version: "1.0" author: researchclaw references: "PyTorch Data Loading Tutorial, pytorch.org"
Efficient Data Loading Best Practice
- Use num_workers = min(8, os.cpu_count()) for DataLoader
- Enable pin_memory=True when using GPU
- Use persistent_workers=True to avoid re-spawning
- Pre-compute and cache transformations when possible
- For image data: use torchvision.transforms.v2 (faster)
- For large datasets: consider memory-mapped files or WebDataset
- Profile with torch.utils.bottleneck to find I/O bottlenecks