DataRobot user model (DRUM) is a CLI tool that allows you to work with Python, R, and Java custom models and to quickly test custom tasks, custom models, and custom environments locally before uploading into DataRobot. Because it is also used to run custom tasks and models inside of DataRobot, if they pass local tests with DRUM, they are compatible with DataRobot. You can download DRUM from PyPI and access DRUM's GitHub repo.
DRUM can also:
Run performance and memory usage testing for models.
Perform model validation tests (for example, checking model functionality on corner cases, like null values imputation).
The following describes the DRUM installation workflow. Consider the language prerequisites before proceeding.
Language
Prerequisites
Installation command
Python
Python 3 required
pip install datarobot-drum
Java
JRE ≥ 11
pip install datarobot-drum
R
Python ≥ 3.6
R framework installed
DRUM uses the rpy2 package to run R (the latest version is installed by default). You may need to adjust the rpy2 and pandas versions for compatibility.
pip install datarobot-drum[R]
To install the DRUM with support for Python and Java models, use the following command:
pipinstalldatarobot-drum
To install DRUM with support for R models:
pipinstalldatarobot-drum[R]
Note
If you are using a Conda environment, install the wheels with a --no-deps flag. If any dependencies are required for a Conda environment, install them with Conda tools.
The following instructions describe installing DRUM with conda (although you can use other tools if you prefer) and then using DRUM to test a task locally. Before you begin, DRUM requires:
To set up the environment, install Docker Desktop and download from GitHub the DataRobot drop-in environments where your tasks will run. This recommended procedure ensures that your tasks run in the same environment both locally and inside DataRobot.
Alternatively, if you plan to run your tasks in a local python environment, install packages used by your custom task into the same environment as DRUM.
DRUM can be run on Windows 10 or 11 with WSL2 (Windows Subsystem for Linux), a native extension that is supported by the latest versions of Windows and allows you to easily install and run Linux OS on a Windows machine. With WSL, you can develop custom tasks and custom models locally in an IDE on Windows, and then immediately test and run them on the same machine using DRUM via the Linux command line.
Tip
You can use this YouTube video for instructions on installing WSL into Windows 11 and updating Ubuntu.
The following phases are required to complete the Windows DRUM installation:
From Control Panel > Turn Windows features on or off, check the option Windows Subsystem for Linux. After making changes, you will be prompted to restart.
Install Ubuntu and launch it from the start prompt. Provide a Unix username and password to complete installation. You can use any credentials but be sure to record them as they will be required in the future.
You can access Ubuntu at any time from the Windows start menu. Access files on the C drive under /mnt/c/.
Because Ubuntu in WSL comes without Python or virtual environments installed, you must install pyenv, a Python version management program used on macOS and Linux. (Learn about managing multiple Python environments here.)
In the Ubuntu terminal, run the following commands (you can ignore comments) row by row:
cd$HOME
sudoaptupdate--yes
sudoaptupgrade--yes
sudoapt-getinstall--yesgit
gitclonehttps://github.com/pyenv/pyenv.git~/.pyenv
#add pyenv to bashrcecho'# Pyenv environment variables'>>~/.bashrc
echo'export PYENV_ROOT="$HOME/.pyenv"'>>~/.bashrc
echo'export PATH="$PYENV_ROOT/bin:$PATH"'>>~/.bashrc
echo'# Pyenv initialization'>>~/.bashrc
echo'if command -v pyenv 1>/dev/null 2>&1; then'>>~/.bashrc
echo' eval "$(pyenv init -)"'>>~/.bashrc
echo'fi'>>~/.bashrc
#restart shellexec$SHELL#install pyenv dependencies (copy as a single line)
sudoapt-getinstall--yeslibssl-devzlib1g-devlibbz2-devlibreadline-devlibsqlite3-devllvmlibncurses5-devlibncursesw5-devxz-utilstk-devlibgdbm-devlzmalzma-devtcl-devlibxml2-devlibxmlsec1-devlibffi-devliblzma-devwgetcurlmakebuild-essentialpython-openssl
#install python 3.7 (it can take awhile)
pyenvinstall3.7.10
While you can run DRUM directly in the pyenv environment, it is preferable to run it in a Docker container. This recommended procedure ensures that your tasks run in the same environment both locally and inside DataRobot, as well as simplifies installation.
Download and install Docker Desktop, following the default installation steps.
Enable Ubuntu version WSL2 by opening Windows PowerShell and running: