Create and Manage Models
Create models in Model Hub, generate versions from training executions, manage approval states, and use models in production pipelines.
Overview
Model Hub workflow:
Create model — Define model in registry (one-time setup)
Train model — Run training execution
Create version — Automatically add model version from outputs
Review & approve — Validate metrics, approve for production
Deploy — Use
model://URI in production workflows
Create a Model
Models are containers for versions. Create a model once, then add multiple versions over time.
Via Web UI
Navigate to Models (in project or organization view)
Click "Create Model"
Enter Model name (e.g., "flower")
Optionally associate with a project
Click "Create"

⚠️ Important: The model URI (
flower) becomesmodel://flower/and cannot be changed later. Choose carefully.
Project-Associated Models
Organization view: All models visible Project view: Only associated models visible (cleaner organization)
To associate:
Creating from project view → Automatically associated
Creating from org view → Choose project during creation
Change later → Organization Settings → Models
Benefit: Organize models by project while still using them across projects.
Create Model Versions from Training
The recommended approach: automatically create model versions when training executions complete.
Step 1: Train and Save Model
train.py:
Step 2: Create Model Version with Metadata
In your train.py add valohai.model-versions metadata to create model version automatically:
What happens:
Execution saves
model.pklto/valohai/outputs/Metadata file tells Valohai to add this to
model://flower/New model version created in Pending state
Version includes
model.pkland all metadata
Step 3: Add Release Notes and Tags
Include additional metadata for the version:
Metadata fields:
model_uri— Which model to add version tomodel_version_tags— Tags specific to this versionmodel_release_note— Description of changes/improvementsCustom properties — Any metrics or context (accuracy, etc.)
Complete Training Example
train.py:
valohai.yaml:
Result:
✅ Model version created in Model Hub
✅ State: Pending (awaiting approval)
✅ Files:
model.pkl,feature_importance.csv✅ Metadata: Metrics, tags, release notes
✅ Lineage: Linked to training execution and data
Model Version States
Every model version has a state in the approval workflow.
Pending (Initial State)
What it means: Newly created, awaiting review
When to use: All new model versions start here
Actions available:
Review metrics and lineage
Compare to previous versions
Approve or reject
Approved
What it means: Validated for production use
When to use: Model meets quality criteria and is ready for deployment
Actions available:
Use in production pipelines
Compare to other approved versions
Revert to pending if issues found
How to approve:
Open model version in UI
Review metrics and artifacts
Click "Approve" button
Add approval notes (optional)

Rejected
What it means: Not suitable for production
When to use: Model fails quality checks, shows bias, or has issues
Actions available:
Document rejection reason
Use rejection notes to inform next iteration
Cannot use in production (intentionally blocked)
How to reject:
Open model version in UI
Click "Reject" button
Required: Add rejection reason
Common reasons: "Overfitting on test set", "Bias detected in predictions", "Worse than baseline"
Model Version Numbers
Versions are automatically numbered sequentially:
Special aliases:
💡 Tip: Use
latestalias for production deployments that should automatically use newest approved version.
Use Models in Workflows
As Execution Input
valohai.yaml:
predict.py:
Using Latest Approved Version
Benefit: Update model version, approve it, and all production pipelines automatically use the new version on next run.
Create Model Version via UI
For existing model files not from training executions:
Navigate to your model
Click "Create Version"
Search for files in data library
Select model file(s)
Add version tags and release notes
Click "Create"
Use cases:
Import externally trained models
Promote experiment checkpoints to model registry
Add models trained outside Valohai
Manage Multiple Files per Version
A model version can contain multiple files:
Result: All three files included in the version:
Access in inference:
Legacy Approach: Sidecar Metadata Files
The older approach used individual .metadata.json files:
This still works, but JSONL format is recommended for:
Consolidating metadata for multiple files
Cleaner outputs directory
Consistency with dataset versioning
Find Model URI
In Model Hub UI:
Navigate to your model
Select a version
Copy model URI from version details panel

Format:
Common Workflow: Train → Approve → Deploy
Step 1: Train Model
Result: New version created in Pending state
Step 2: Review & Approve
Open Model Hub → Find model
View new version (Pending)
Review:
Training metrics
Lineage (which data was used)
Compare to previous versions
Click "Approve"
Add approval notes: "Approved for staging deployment - 3% improvement in recall"
Result: Version state changed to Approved
Step 3: Deploy
Option A: Update deployment to use new version:
Option B: Use latest alias (automatic):
Result: Production system now uses approved model v5. Model can be used for inference inside Valohai executions or deployed outside Valohai to your serving infrastructure.
Best Practices
Descriptive Model Names
Use Release Notes
Tag Strategically
Include Key Metrics
Review Before Approving
Checklist:
✅ Metrics better than baseline
✅ No overfitting (train vs test performance similar)
✅ Lineage verified (correct training data)
✅ Fairness/bias checked
✅ Comparison to previous version documented
Related Pages
Models Overview — Why use Model Hub
Model Artifacts & Versioning — Advanced versioning patterns
Add Context to Your Data Files — Metadata system details
Next Steps
Create your first model in Model Hub
Train a model and create a version automatically
Set up approval workflow with your team
Deploy using
model://URIsExplore automated deployment workflows
Last updated
Was this helpful?
