This How-To describes how to set Python or R code environments for plugins, projects and recipes (or other objects within the project).
Dataiku DSS code environments address the problem of managing dependencies and versions when writing code in R and Python. They are similar to the Python virtualenv. Code environments provide a number of benefits, including:
Your Dataiku DSS administrator, or any user in a group with the proper permissions, can create different code environments, which are then available for you to use.
A separate code environment can be specified for many Dataiku objects, including:
By default, projects use the Dataiku DSS environment when processing Python or R code. In an individual project, you can set a different code environment to be used when processing code within that project.
Similarly, you can select an R environment using the controls under Environment for R Recipes
If there is an environment you expect to see that is missing, contact your administrator. They may need to create a new code environment or give you permission to use an existing one.
By default, Python and R recipes use the project’s code environment. For each recipe, you can set a different code environment to be used when processing code within that recipe.
On the Advanced tab of a recipe, you can set the code environment using the Selection behavior dropdown.
By default, Python and R notebooks use the project’s code environment. For each notebook, you can set a different code environment to be used when processing code within that notebook.
You can set the code environment at notebook creation time, or by changing the kernel (Kernel > Change kernel from the notebook menus).
By default, Python Bokeh and R Shiny web apps use the project’s code environment. For each web app, you can set a different code environment to be used when processing code within that web app.
While in Edit mode, on the Settings tab of a web app you can set the code environment using the Code env dropdown.
By default, R markdown documents use the project’s code environment. For each document, you can set a different code environment to be used when processing code within that document.
While in Edit mode, on the Settings tab of a document you can set the code environment using the Code env dropdown.
The plugin developer defines the code environment specification as part of the plugin. After installing a plugin that contains a code environment definition, you are prompted to create a code environment for the plugin.
Dataiku Visual Machine Learning allows you to create custom models using Python, in addition to the built-in models. The Python code environment to be used for training those custom models can be set in Design mode on the Python environment panel
You can insert Python code in custom scenario steps, custom scenario triggers, custom models, custom dataset probes and checks… there are a lot of places you can use custom code in Dataiku DSS!
For objects that are not focused on code, but accept custom code, the dropdown list is typically placed near the custom code.