Skip to main content
This page explains every field in the training section of the YAML config.
The SDK reads a single YAML file that contains both data_generation and training. run_training(config_path=...) reads the training section from that file.

File format

Your YAML file is a run config that includes top-level keys and a nested training section:

Configuration structure

The training section has these parts:
  • metric: output type and class list (if multi-class)
  • dataset: where to load the dataset created by data generation
  • prompt_template: the exact format the model is trained to follow
  • training: hyperparameters and performance options
  • output: where to write artifacts + optional pushes (Hub/Luna Studio/object store)
  • model: base model + LoRA settings + model download options

metric


dataset

Point training at the generated dataset

run_data_generation(...) returns a dataset path/name. After generation completes, set:
  • training.dataset.name to that value, then run training.

prompt_template

prompt_template is required.
  • It must reference your dataset columns using {variable} placeholders.
  • For boolean metrics, the model should respond with "true" or "false".
  • For multi-class metrics, the model should respond with a single class-key token ("0", "1", …).
Tip: your template variables are validated against dataset columns during preflight.

training (hyperparameters)


output

Environment variables for pushes

  • Hugging Face: HF_TOKEN (required when push_to_hub: true)
  • W&B: WANDB_API_KEY (optional; warning if missing when use_wandb: true)

model