Documentation / ML Studio
Training
Design the strategy with eight questions, launch a training run, follow the curve live, compare experiments and report from your own script with the SDK.
On this page
Training in Yuli is a job with a plan, validation and a record: it keeps going even if you close the chat, it can be paused and it leaves a model version that is evaluated separately.
Design the strategy
In the Design tab, Yuli proposes a strategy and justifies it by answering eight questions:
| # | Question | Example answer |
|---|---|---|
| 1 | What it learns | Whether a customer will churn in the next 90 days. |
| 2 | Which strategy it chose | From scratch, with gradient boosting. |
| 3 | Why | Tabular data, 40,000 rows, no previous model. |
| 4 | Which alternatives it evaluated | Logistic regression (baseline) and random forest. |
| 5 | What resources it needs | CPU, a few minutes, little memory. |
| 6 | What limitations it has | It doesn't know customers younger than one month. |
| 7 | How we'll know it improved | Test F1 ≥ 0.85 and better than the baseline. |
| 8 | Support level | How well tested that path is in Yuli. |
Review it, adjust whatever is needed and press Approve and train ›.
Strategies
| Strategy | When |
|---|---|
| From scratch | There is no previous model. |
| Warm start | Continue from the weights of a previous version. |
| Fine-tuning | Adapt an already trained model to your data. |
| Feature extraction | Use a model as a feature generator. |
| Semi-supervised | Few labels and many unlabeled examples. |
| Self-supervised | Learn structure from unlabeled data. |
| Continual learning | Update the model with new data without forgetting what it learned. |
New training run
In New training run you fill in:
| Field | What it is |
|---|---|
| Dataset | The data version used for training. |
| Column to predict | The target. |
| Framework | scikit-learn, PyTorch, Transformers, XGBoost, LightGBM or your own script. |
| Algorithm | A specific one or Automatic (Yuli chooses). |
| Epochs | How many passes over the data (neural networks). |
| Device | CPU or GPU. |
| Mode | Single run, Hyperparameter search or AutoML. |
Included tabular algorithms: logistic and linear regression, ridge, lasso, random forest, extra trees, gradient boosting, decision tree, kNN, naive Bayes, SVM, SGD and MLP. For anomalies: isolation forest, LOF and robust z-score.
When you press Train, Yuli does three things in order:
- Plan: it calculates memory, time, device and risk.
- Validate: it checks that the data hasn't changed, that the Python environment is ready and that there are resources.
- Start: it launches the job.
States and controls
| State | Meaning |
|---|---|
| Queued | Waiting for its turn or for resources (for example, “Waiting for VRAM: needs X, Y available”). |
| Validating | Pre-flight checks. |
| Running | Training. |
| Pausing / Paused | Saves a checkpoint and stops. |
| Completed | Finished and registered a version. |
| Failed | Stopped with an error; View log shows why. |
| Cancelled | You stopped it. |
Controls: Pause, Resume, Cancel and View log.
Live learning curve
The Learning curve plots loss and train and validation metrics while it trains, with Epoch n of N, Best so far, Elapsed, Remaining and, if it uses a GPU, GPU: name. Choose the smoothing (Raw, Smooth, Very smooth) and turn on Log scale when the loss drops by several orders of magnitude.
If the validation loss rises while the train loss keeps falling, the model is memorizing: Yuli warns of possible overfitting. Stop earlier or reduce the complexity.
Experiments and hyperparameter search
Experiments stores every training run with its parameters, data and metrics so you can compare them side by side.
- Hyperparameter search uses Optuna to try combinations and keep the best one on validation.
- AutoML tries several algorithms and configurations for you.
- If your team uses MLflow, you can mirror the experiments there (optional).
Your own script with the SDK
If you already have a training loop (spaCy included), use framework: script and report with yuli_ml.sdk. Your
script appears in ML Studio just like a built-in adapter: curves, pause, checkpoints and a registered version.
# train.py
import numpy as np
import yuli_ml.sdk as yuli
epochs = 20
device = yuli.device() # "cuda:0", "mps" or "cpu", depending on what Yuli reserved
yuli.info(f"Training on {device}")
start = 0
if yuli.resume_from(): # resume after a pause
start = load_checkpoint(yuli.resume_from())
best_f1, best_epoch = 0.0, 0
for epoch in range(start, epochs):
loss = train_one_epoch(device)
f1 = validate()
yuli.log("train/loss", loss, step=epoch, epoch=epoch)
yuli.log("val/f1", f1, step=epoch, epoch=epoch, split="validation")
if f1 > best_f1:
best_f1, best_epoch = f1, epoch
if yuli.should_stop(): # the user pressed Pause or Cancel
path = yuli.checkpoint_dir()
save_checkpoint(path, epoch)
yuli.checkpoint(path, step=epoch, epoch=epoch, resumable=True)
yuli.stop()
yuli.progress(epoch + 1, epochs)
yuli.save_model({"layer.weight": np.zeros((4, 4))}, metrics={"f1": best_f1}, best_epoch=best_epoch)| Function | What for |
|---|---|
log, progress, info | Live metrics, progress and messages. |
should_stop, checkpoint, checkpoint_dir, resume_from | Pause, checkpoints and resume. |
model_dir, save_model, report | The version folder, final weights and evaluation reports. |
device, use_gpu | The reserved device (and spacy.prefer_gpu() if you use spaCy). |
warm_start | The weights of the version you are fine-tuning from. |
Outside Yuli (python train.py in a terminal) every SDK call does nothing: your script keeps working on its own.
Need your own algorithm or metric? Write it in ml/extensions/*.py with @ext.algorithm, @ext.metric or
@ext.transform, and use it like the built-in ones.
Next step: Evaluation and models.