data-loading
What it does
The skill improves how training data is loaded and prepared. It is for practitioners whose training is slowed by data input.
When to use it
- ✓When you set up a DataLoader or data preprocessing for model training.
- ✓When your GPU sits idle while it waits for data.
- ✓When you work with large datasets and need faster input.
Skill link
https://github.com/aiming-lab/AutoResearchClaw/blob/main/researchclaw/skills/builtin/tooling/data-loading/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“My GPU is idle during training. Speed up my PyTorch data loader.”
5 new skills a week. 1 minute to read.
How it works
The agent recommends worker and pinned memory settings, persistent workers, cached transformations, and memory-mapped files for large data. It also suggests profiling to find input bottlenecks.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
FAQ
What is pin memory?
A setting that speeds up copying data from the computer's memory to the GPU.
What does it suggest for very large datasets?
Memory-mapped files or WebDataset-style storage.
How do I find the slow part?
Profile the loader with a PyTorch bottleneck tool to see where the time goes.
Details
Original description by the author
Optimize data loading pipeline to prevent GPU starvation. Use when setting up DataLoader or data preprocessing.
Popularity
- GitHub stars
- 15k
- Ranking position
- #11074
- License
- MIT
- Updated
- 8/19/2026
Comments
- …
More skills from this repository
a-evolve
15kHelps your agent improve over repeated runs by diagnosing failures, creating targeted skills from error patterns, and recording lessons for later use.
biology-biopython
15kHelps your agent work with DNA, RNA, and protein sequences using Biopython, including file parsing, sequence calculations, BLAST searches, and database access.
chemistry-rdkit
15kHelps your agent analyze molecules written as SMILES strings with RDKit, including descriptors, fingerprints, similarity, and substructure search.
hypothesis-formulation
15kHelps your agent turn an observation into testable hypotheses, with competing explanations and clear predictions that could prove them wrong.
Similar skills
pytorch-patterns
280kHelps your agent use PyTorch for machine learning models. It applies best practices for efficient model training and ensures reproducible results.
evm-token-decimals
280kHelps your agent avoid errors with decimal numbers across different blockchain networks. It ensures token values are accurate in transactions and calculations.
ito-inference
280kLets your agent check the availability of AI models for use. It connects the compute request with the ready model service.