Training Models with AutoTrain
HuggingFace AutoTrain lets you train custom ML models without writing training code. XGENIA integrates AutoTrain through AI tools and visual pro nodes.
What you will learn in this guide​
- How to create an AutoTrain project
- How to upload training data
- How to start and monitor training
- How to scaffold a complete ML pipeline on the canvas
Supported Tasks​
| Task | Description | Example Use Case |
|---|---|---|
text-classification | Classify text into categories | Sentiment analysis, spam detection |
tabular-classification | Classify tabular data rows | Churn prediction, fraud detection |
tabular-regression | Predict numeric values from tabular data | Price forecasting, scoring |
image-classification | Classify images into categories | Product categorization |
llm-finetuning | Fine-tune a large language model | Custom chatbots, domain-specific AI |
dreambooth | Fine-tune image generation models | Custom image generation |
Training via AI Chat​
Step 1: Create a project​
Create an AutoTrain project called "sentiment-model" for text classification
The AI calls autotrain_create_project and returns a project ID.
Step 2: Upload your data​
Upload training data to the sentiment-model project from https://example.com/train.csv
The AI calls autotrain_upload_data with the project ID and data URL.
Step 3: Start training​
Start training the sentiment-model project
The AI calls autotrain_start_training. Training runs on HuggingFace infrastructure.
Step 4: Check status​
What's the status of my sentiment-model training?
The AI calls autotrain_status and reports progress, including any trained model repositories.
Scaffolding a Full Pipeline​
Ask the AI to set up a complete ML pipeline on your canvas:
Create an AutoTrain workflow for text classification
This calls create_autotrain_workflow and places the following nodes on your canvas:
- HF Token variable — stores your API key
- Project Name variable — the AutoTrain project name
- Dataset URL variable — where your training data lives
- Create Project — JS function node that creates the project
- Upload Data — JS function node that uploads the dataset
- Start Training — JS function node that triggers training
All nodes are pre-wired using @label references. Just set your token, dataset URL, and trigger the pipeline.
Using the Auto ML Trainer Pro Node​
For more control, use the Auto ML Trainer visual node.
Inputs​
| Port | Type | Description |
|---|---|---|
data | Array | Training data (array of records) |
targetColumn | String | Column to predict |
taskType | Enum | text-classification, tabular-classification, etc. |
baseModel | String | Base model from HuggingFace Hub (optional) |
hyperparameters | Object | { learning_rate, num_epochs, batch_size } |
hfToken | String | HuggingFace API token |
mlServerUrl | String | ML Coordinator URL |
Train | Signal | Start training |
checkStatus | Signal | Poll for training progress |
Outputs​
| Port | Type | Description |
|---|---|---|
status | String | Current training status |
hfProjectId | String | AutoTrain project ID |
hfModelRepo | String | Trained model repository on HuggingFace |
trainingMetrics | Object | Accuracy, loss, and other metrics |
error | String | Error message if training fails |
statusChanged | Signal | Fires when status changes |
Typical Workflow​
- Wire your analyzed data and target column from the Auto ML Analyzer
- Set the
taskTypematchinghfTaskTypefrom the analyzer - Trigger
Trainto start - Poll with
checkStatusor listen forstatusChanged - When complete, use
hfModelRepowith the Auto ML Predictor node