Phase 00: Setup & Tooling

Data Management

Data is the fuel. How you manage it determines how fast you go. Language: Python Load, stream, and cache datasets using the Hugging Face datasets library. Convert between CSV, JSON, Parquet, and Arrow formats and explain their tradeoffs. Create reproducible train/validation/test splits with fixed random seeds. Manage large model and dataset files using .gitignore, Git LFS, or DVC. Every AI project starts with data. You need to find datasets, download them, convert between formats, split them for training and evaluation, and version them so experiments are reproducible. Doing this manually every time is slow and error-prone. You need a repeatable workflow. The Hugging Face datasets library is the standard way to load data for AI work. It handles downloading, caching, format conversion, and streaming out of the box. This downloads the IMDB movie review dataset. After the first download, it loads from cache at /.cache/huggingface/datasets/. Some datasets are too large to fit on disk. Streaming loads them row by row without downloading the full thing. Streaming gives you an IterableDataset. You process rows as they arrive. Memory usage stays constant regardless of dataset size. The datasets library uses Apache Arrow under the hood. You can convert to other formats depending on what your pipeline needs. Format comparison: For AI work, Parquet is the best storage format. Arrow is what you…

Data Management: Data is the fuel. How you manage it determines how fast you go. Language: Python Load, stream, and cache datasets using the Hugging Face…

This free lesson is part of the AI Engineering from Scratch curriculum. Read the full explanation, run the lesson code, and verify the result in the interactive reader or from the repository source.

Browse the complete course catalog or open this lesson on GitHub.