DataRobot DRUM

raw JSON →
1.17.15 verified Fri May 01 auth: no python

DRUM (DataRobot User Models) allows you to develop, test, and deploy custom models for the DataRobot platform. It supports Python 3.8–3.14 and is actively maintained. Releases follow a regular cadence aligned with DataRobot's platform updates.

pip install datarobot-drum
error ModuleNotFoundError: No module named 'datarobot_drum'
cause Package not installed or wrong import path.
fix
Run pip install datarobot-drum and use from datarobot_drum import ....
error ModuleNotFoundError: No module named 'datarobot.drum'
cause Using old import path from version <1.0.
fix
Replace from datarobot.drum import ... with from datarobot_drum import ....
error ValueError: invalid literal for int() with base 10: 'some_string'
cause Numeric class labels being treated as integers.
fix
Ensure target column contains string labels, not numeric.
error RuntimeError: DRUM does not support Python 3.15
cause Python version not supported.
fix
Use Python 3.8 to 3.14.
breaking In v1.0, the package was renamed from `datarobot.drum` to `datarobot_drum`. All imports must be updated.
fix Replace `from datarobot.drum import ...` with `from datarobot_drum import ...`.
deprecated In v1.6.5, the `--production` flag was deprecated. Use `--production` is not available for custom Flask extensions via `custom_flask.py`.
fix Use `custom_flask.py` without `--production` flag to add Flask extensions.
gotcha Numeric class labels can be interpreted as numbers instead of strings. For classification, ensure labels are strings.
fix Convert labels to strings in your custom model, e.g., `y = y.astype(str)`.
gotcha DRUM requires Python <3.15 and >=3.8. Using Python 3.15+ will cause installation failure.
fix Ensure your Python version is between 3.8 and 3.14 inclusive.

Check DRUM import and basic pattern for custom model.

import datarobot_drum as drum
from datarobot_drum import RuntimeParameters

# Test DRUM installation
try:
    from datarobot_drum.model import ModelBundle
    print("DRUM is ready")
except ImportError as e:
    print(f"Import error: {e}")

# Minimal custom model example
# Create a file called custom.py with:
# def fit(X, y, row_weights=None, **kwargs):
#     pass
# def score(data, model, **kwargs):
#     return model.predict(data)

# Run with: drum fit --code-dir . --input training.csv --target target