Implement PyTorch DataLoader for exoskeleton dataset#28
Merged
Conversation
Adds a complete PyTorch Dataset and DataLoader implementation for the exoskeleton Phase1 dataset from HuggingFace: Core Components: - ExoskeletonDataset: PyTorch Dataset with auto-download from HuggingFace - Two-layer caching (HF cache + preprocessed tensor cache) - Participant-based filtering for train/val/test splits - Optional feature normalization with computed statistics - Variable-length sequence handling with padding - download.py: Dataset download and cache management utilities - Automatic download from HuggingFace Hub - Data integrity verification (field presence, dimensions, sequence lengths) - Cache info and clear cache functions - create_dataloaders(): Helper function for train/val/test DataLoaders - Consistent normalization across splits - Configurable batch size, workers, shuffling - collate_fn: Custom collation for variable-length sequences - Pads to max sequence length in batch - Returns mask for valid timesteps - Preserves metadata (participant, trial name, mass) Configuration: - configs/data/phase1.yaml: YAML config with splits, features, and settings Testing: - 44 unit tests covering datasets, download, and dataloader functionality - Tests for caching, normalization, padding, metadata, edge cases Dependencies: - Added datasets>=2.14.0 and huggingface-hub>=0.17.0 to pyproject.toml 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
DylanG5
force-pushed
the
feat/pytorch-dataloader
branch
from
January 6, 2026 01:51
3dbee23 to
14b2191
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Core Components
ExoskeletonDataset (
datasets.py): PyTorch Dataset with auto-downloaddownload.py: Dataset download and cache management
create_dataloaders(): Helper for train/val/test DataLoaders
collate_fn: Custom collation for variable-length sequences
Configuration
configs/data/phase1.yaml: YAML config with participant splits, features, and settingsTesting
Dependencies
datasets>=2.14.0andhuggingface-hub>=0.17.0Test plan
pytest tests/test_data/ -vruff check src/ tests/mypy src/black --check src/ tests/Usage Example
🤖 Generated with Claude Code