Today we will see how the integration with Python and DataRobot is done. To do that it is important to have executed the models of the case that we are working on. We must go to the PREDICT tab in the model that we want to display. Here we select the DEPLOY MODEL API option and then ADD NEW DEPLOYMENT.
In NAME DEPLOYMENT we will put the name of the deployment that interests us and to track change is our model enable the option Allow DataRobot to track data drift and finally select DEPLOY MODEL.
Then in the popup window we will select REVIEW DEPLOYMENT.
When we have opened the Overview we will select the INTEGRATIONS tab to generate the Python code.
In the Integrations screen we will select COPY TO CLIPBOARD. Then we will open a Notepad and copy the code in the
It is important to save this file with the .py ending, this will allow you to recognize that the file is a Python code.
Do not forget to save the data file that we want to display in the same folder where we store the code. Additionally, it is important to bear in mind that if it is a csv file it is necessary to save it with the comma as a separator.
The next step is to open our system command window. With writing cmd in our search engine we will find it.
After opening the command window it is important to stop in the folder where the code and data file to be deployed was saved. With the dir command we will see the folders that are contained in the folder where by default the console locates us.
For the case of this exercise the files of interest are in the desktop so with the command cd “Desktop” we will be located in this folder. Remember that for this code to work we have to have Python installed and have it configured in our system environment variables.
Finally for the deployment we only need to write Python <Name of our code> <Name of the file to load>
After waiting a few seconds the image that will appear will be as follows.
And when we stand on our DataRobot platform we will have the deployment with the date that was executed.