Skip to content

Click in-app to access the full platform documentation for your version of DataRobot.

Examples directory

The examples directory contains both sample code (snippets for manual inspection) and example code (self-contained examples that you can run) for several languages.

To access them, open the examples folder in the agent tarball. Select the language you wish to use and reference the respective readme for further instruction.

Examples include model configuration, data, and scripts used to create deployments and run the examples. These examples use Python to programmatically create the model package and deployment. Therefore, you must install the Python version of the MLOps library (described below).

Run code examples with Python

To run the Python code examples, you must install the dependencies used by the examples:

pip install -r examples\python\requirements.txt

To run an example:

  1. Initialize the model package and deployment by running:

  2. Set the environment variables for the deployment and the model returned from creating the deployment by copying and pasting them into your shell:

    export MLOPS_DEPLOYMENT_ID=<deployment_id>; export MLOPS_MODEL_ID=<model_id>

  3. Generate predictions and report statistics to DataRobot by running:

Updated November 5, 2021
Back to top