Skip to content

DagsHub Model Registry Integration

Overview

IdeaWeaver integrates with DagsHub for experiment tracking and model management. This guide shows you how to use DagsHub with IdeaWeaver for model versioning and deployment.

Setup

Train and Register a Model

source ideaweaver-env/bin/activate
ideaweaver train \
  --model sshleifer/tiny-distilbert-base-cased \
  --dataset ./datasets/training_data.csv \
  --mlflow-uri https://dagshub.com/<your-username>/<your-repo>.mlflow \
  --dagshub-token <your-dagshub-token> \
  --dagshub-repo-owner <your-username> \
  --dagshub-repo-name <your-repo>

Example Output

🤗 Using model: sshleifer/tiny-distilbert-base-cased
🚀 Starting model training...

============================================================
🎉 TRAINING SUMMARY
============================================================
📂 Model Path:           ./my-model
🤖 Base Model:           sshleifer/tiny-distilbert-base-cased
📊 Dataset:              ./autotrain_projects/my-model

📊 KEY PERFORMANCE METRICS
----------------------------------------
📉 Final Train Loss:     1.0986
🎯 Overall Accuracy:     20.0%

============================================================
✨ Training completed successfully! Model is ready for use.
============================================================

✅ Training completed successfully!
📁 Model saved to: ./my-model

DagsHub UI Example

Once your model is registered, you can view it in the DagsHub Model Registry UI:

DagsHub Model Registry Screenshot

Features

  • Experiment tracking
  • Model versioning
  • Artifact storage
  • Performance metrics
  • Model deployment
  • Collaboration tools

Configuration

Required Parameters

  • --mlflow-uri: DagsHub MLflow URI
  • --dagshub-token: Your DagsHub access token
  • --dagshub-repo-owner: Your DagsHub username
  • --dagshub-repo-name: Repository name

Getting Your DagsHub Token

  1. Go to DagsHub Tokens Settings
  2. Create a new token
  3. Copy the token value
  4. Use it in your training command

Best Practices

  1. Repository Organization
  2. Use meaningful experiment names
  3. Tag experiments appropriately
  4. Document model versions

  5. Model Management

  6. Version your models
  7. Add model descriptions
  8. Track model lineage

  9. Collaboration

  10. Share experiments with team
  11. Document findings
  12. Track changes

Troubleshooting

Common Issues

  1. Authentication Errors
  2. Verify token is correct
  3. Check token permissions
  4. Ensure proper access

  5. Connection Issues

  6. Check internet connection
  7. Verify repository exists
  8. Validate URI format

Debug Mode

Enable verbose output for debugging:

ideaweaver train \
  --model sshleifer/tiny-distilbert-base-cased \
  --dataset ./datasets/training_data.csv \
  --mlflow-uri https://dagshub.com/<your-username>/<your-repo>.mlflow \
  --verbose

Resources