The tutorial follows one AG News workflow. Read and execute it in order:
- Text-classification basics: samples, labels, logits, loss, and splits.
- Environment: uv, CPU checks, and the Kaggle GPU boundary.
- Data and tokens: CSV, manifests, vocabulary, truncation, and padding.
- Three models: mean pooling, convolutions, and bidirectional LSTM.
- Training and resume: dry runs, normal runs, best selection, and last resume.
- Evaluation and inference: test protocol, errors, and text prediction.
The complete small CPU path is:
uv sync --locked --extra dev
uv run python scripts/download_data.py --data-dir data/raw
uv run text-classify prepare-data --config configs/learning_minimal.yaml
uv run text-classify inspect-data --config configs/learning_minimal.yaml
uv run text-classify train --config configs/learning_minimal.yaml --dry-run --set device=cpu
uv run text-classify train --config configs/learning_minimal.yaml --set device=cpu --set run_name=tutorial-runTutorial metrics only validate the workflow. See the recorded run for the full-data result.