mix text.gen_golden_fixtures (Text v0.6.0)

Copy Markdown View Source

Runs the canonical test inputs through the reference fastText implementation and writes per-input top-K predictions to test/fixtures/golden_predictions.json.

Acts as a thin wrapper over priv/scripts/generate_golden_fixtures.py so the workflow is consistent with mix text.download_lid176. The wrapper simply ensures the prerequisites exist and shells out to Python; it does not embed any model logic itself.

Prerequisites

  • Python 3.8 or newer.

  • The fasttext Python package: pip install fasttext.

  • The lid.176.bin model file present in priv/lid_176/ — run mix text.download_lid176 first.

Usage

mix text.gen_golden_fixtures
mix text.gen_golden_fixtures --top-k 10

Options

  • --top-k N — number of predictions to record per input (default 5).

  • --python PATH — path to the Python interpreter (default: python3).

Any unrecognised options are forwarded to the underlying script unchanged.