Skip to main content
Sort texts into classes. Each sample is one .txt file plus one row in a labels CSV that names the file and its class.

Folder layout

  • The text folder must be named texts and sit next to the labels CSV.
  • One document per file, UTF-8 encoded. Every file must end in .txt. The ingestor also accepts .text, but training opens only <filename>.txt, so a .text dataset ingests and then fails to train.

Labels CSV

Do not declare a reserved column name in schema: filename, extension, id and the others listed there fail the ingest. The label column does not need to be in schema either: label: names it, and the ingestor removes it from the stored table schema if you declare it anyway. schema is only for additional typed columns you want stored alongside each sample.

Ingest with the CLI

Each split is one folder laid out as above. Ingest the training and the test split separately:
--label-column is required for this task. Set it to the name of the label column in labels.csv. On a terminal, the CLI asks for it if you leave it out. In a script (--no-input, --output-json or no terminal), leaving it out sends an empty label, and the spec fails validation before anything is ingested.

ingest.yaml

What the ingestor checks

Plus the checks every ingest runs.

Sample dataset

The template ships five product-review style .txt files and a labels CSV with the classes positive, negative and neutral. The manifest ships as labels_file_sample.csv: rename it to labels.csv before you ingest the folder, because the CLI reads only that name. For the Helm chart, stage the renamed folder so that it matches the paths in the ingest.yaml above.

Score formulas

When you define a use case on this data, the platform currently accepts Accuracy, F1 Score, Micro F1, F1 Weighted, Precision, Recall, AUC-ROC, Matthews Correlation Coefficient, Log Loss, Loss, Cohen’s Kappa, Quadratic Weighted Kappa (QWK), Jaccard Score, Hamming Loss and Brier Score.

Next steps