A tool for migrating experiment data from Neptune.ai to Comet ML.
This exporter transfers all non-deleted runs from a Neptune project to a Comet project, including:
- Hyperparameters
- Training and validation metrics
- Final metrics
- Metadata
- Owner information
Install the required dependencies:
pip install comet_ml neptuneOr use a virtual environment:
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install comet_ml neptunepython3 neptune_exporter.py \
--neptune-project-name "workspace/project-name" \
--neptune-api-token "your-neptune-api-token" \
--comet-workspace "your-workspace" \
--comet-project-name "your-project-name"Make sure to set your Comet API key as an environment variable:
export COMET_API_KEY="your-comet-api-key"You can also use environment variables instead of command-line arguments:
export NEPTUNE_PROJECT="workspace/project-name"
export NEPTUNE_API_TOKEN="your-neptune-api-token"
export COMET_WORKSPACE="your-workspace"
export COMET_PROJECT_NAME="your-project-name"
export COMET_API_KEY="your-comet-api-key"
python3 neptune_exporter.py \
--neptune-project-name "$NEPTUNE_PROJECT" \
--comet-workspace "$COMET_WORKSPACE" \
--comet-project-name "$COMET_PROJECT_NAME"- Project name: Format is
workspace/project-name - API token: Get it from Neptune Settings
- Workspace: Your Comet workspace name
- Project name: The Comet project name (will be created if it doesn't exist)
- API key: Get it from Comet Settings
The exporter transfers the following data from Neptune to Comet:
- Hyperparameters: All parameters from
parametersorhyperparametersnamespace - Metrics: Training and validation metrics including:
train/loss,train/accuracyval/loss,val/accuracytraining/train/epoch/accuracy,training/train/epoch/losstraining/train/batch/accuracy,training/train/batch/losstraining/test/epoch/accuracy,training/test/epoch/losstraining/test/batch/accuracy,training/test/batch/loss
- Final metrics: Metrics from the
finalnamespace - Metadata: Additional metadata from the
metadatanamespace - Owner information: User information from
sys/owner
After running the exporter, check the output for experiment URLs. Each exported run will display a Comet experiment URL:
created comet experiment: https://www.comet.com/your-workspace/your-project-name/experiment-id
Visit these URLs to verify that all data was transferred correctly.
If you get ModuleNotFoundError, make sure you've installed the required packages:
pip install comet_ml neptuneIf you get a NeptuneInvalidApiTokenException, verify your Neptune API token is correct. You can get it from Neptune Settings.
Make sure the Neptune project name is in the format workspace/project-name and that you have access to it.
If experiments are created but no data appears, check:
- The Neptune runs contain data in the expected paths (
parameters,train/loss, etc.) - Your Comet API key has write permissions to the workspace
- The script completed without errors
Apache 2.0 License