Skip to content

Weights & Biases to DagsHub Migration

Migrating your machine learning (ML) experiments from Weights & Biases (W&B) to DagsHub facilitates enhanced collaboration, version control, and comprehensive experiment tracking. This page explains how to transfer run data, metrics, parameters, and artifacts seamlessly from W&B to DagsHub.

This migration leverages MLflow for consistent logging and tracking, ensuring your experiments are well-documented and easily accessible.

How Does the Migration Work?

The migration tool automatically extracts experiment data from W&B, including metrics, parameters, and artifacts. It then logs this information to DagsHub using MLflow, which is integrated into DagsHub's platform. This process not only preserves the integrity of your experiment data but also enhances its accessibility and usability within DagsHub's collaborative environment.

How to Migrate Your Experiments?

Migrate your W&B experiments to DagsHub in a few simple steps:

1. Clone the Migration Project

First, clone the migration tool repository from DagsHub:

git clone https://dagshub.com/DagsHub/import_from_wb.git
cd import_from_wb

2. Install Necessary Packages

Ensure you have Python 3.8 or later and install all required packages:

pip install -r requirements.txt

3. Set Up Environment Variables

Configure your environment with the necessary credentials for W&B and DagsHub to ensure secure and smooth migration.

4. Run the Migration Script

Execute the migration script with the required parameters:

python import_from_wb.py <wb_owner> <wb_project> <dh_owner> <dh_repo> --run_id <optional_run_id>

Replace the placeholders with your specific W&B and DagsHub project details. Optionally, specify a single run ID to migrate a specific experiment.


Congratulations! You've successfully migrated your experiments from W&B to DagsHub. Now, your ML experiments can benefit from DagsHub's collaborative features, such as pull requests for data and models, issue tracking for experiments, and more.

Additional Resources

Known Issues, Limitations & Restrictions

Currently, the migration tool does not support the transfer of certain W&B artifact types due to compatibility issues. However, we are actively working to expand support and enhance the tool's capabilities.