The ModelOp Center (MOC) is flexible on how models are registered so that data scientists can leverage their preferred environments for model creation. In other words it is agnostic to the toolkit used to create the model.
ModelOp Center contains a package with the RStudio addin installation “tar.gz” file. Please contact your ModelOp representative to get the latest version.
Installation
These installation instructions assume the following:
RStudio is already installed in any of the two formats: RStudio Desktop or RStudio Server.
If you are installing from source code repository (as opposed to already having the tar.gz file).
Maven is already installed.
You have access to ModelOp’s rstudio-addin github repository.
If you don’t already have the tar.gz installable file but have access to the repository:
Code Block | ||
---|---|---|
| ||
git clone https://github.com/modelop/rstudio-addin.git
cd rstudio-addin
mvn clean install |
Then open RStudio or your R shell and make sure you have the required installation dependency: devtools
Code Block | ||
---|---|---|
| ||
install.packages("devtools") |
Install the ModelOp RStudio addin:
Code Block | ||
---|---|---|
| ||
devtools::install_local("rstudio-addin-2.1-SNAPSHOT.tar.gz") |
Note |
---|
Watch out for when you just recently installed the package, you may need to restart the R session in order to see the package’s addins. |
Configuration
Before being able to use the addin in your RStudio instance, please make sure your RStudio knows where your ModelOp Center can be reached by providing the base URL in either of the following ways.
Setting up the
MOC_INSTANCE_URL
environment variable with the base URL, e.g.: “http://modelop:8090” before running the RStudio Server or before opening RStudio Desktop (from a terminal). Please note for RStudio Server installations that the environment variables aren’t automatically passed to the instance, but rather need to be set in the.Renviron
file. For simplistic purposes, we can achieve this as in the example below, but see here for details on R startup configuration.Code Block language bash # The following variable is assumed to be set for your environment export MOC_INSTANCE_URL=http://modelop:8090 # Then make sure to pass it to the .Renviron file before running your instance env | grep MOC_INSTANCE_URL > /home/rstudio/.Renviron # Now you can start the RStudio server sudo rstudio-server start
Even after started the RStudio you can modify (or set) the environment variable from within the R session to change the base ModelOp Center URL.
Code Block language r Sys.setenv(MOC_INSTANCE_URL="http://modelop:8090")
From the “Addins” toolbar, select the option “Load ModelOp model“.
Select the desired model from the list or filter using the live search bar and click on LOAD.
There are multiple ways in which a model can be updated, depending on what you are ultimately achieving.
Editing the source code
From the “Addins” toolbar, select the option “Save existing ModelOp model“.
Select the desired asset from the available model assets list or filter using the live search bar and click SAVE.
The Addin will update ModelOp Center with the updated code for the selected asset.
Updating model metadata fields
Status | ||
---|---|---|
|
Currently editing the model metadata fields from within RStudio is not supported, please refer to the ModelOp Center UI for these operations.
Adding attachments
From the “Addins” toolbar, select the option “Add attachment“.
Select the model to attach the file(s) to.
Click on “Browse” to select the file(s) to attach.
Optionally, click a row of the file list to select and then remove from the list before submitting.
When ready click on ATTACH.
The Addin will upload the external file assets and attach them to the selected model.
Submit model version
From the “Addins” toolbar, select the option “Submit ModelOp model“.
Select the model to submit, the Addin will display the latest changes on the model. Click on SUBMIT when ready.