Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 1.31 KB

File metadata and controls

25 lines (19 loc) · 1.31 KB

Tutorial

中文 | Documentation index

The tutorial follows one AG News workflow. Read and execute it in order:

  1. Text-classification basics: samples, labels, logits, loss, and splits.
  2. Environment: uv, CPU checks, and the Kaggle GPU boundary.
  3. Data and tokens: CSV, manifests, vocabulary, truncation, and padding.
  4. Three models: mean pooling, convolutions, and bidirectional LSTM.
  5. Training and resume: dry runs, normal runs, best selection, and last resume.
  6. 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-run

Tutorial metrics only validate the workflow. See the recorded run for the full-data result.