Creating a new Code Object using the Rhino FCP UI
Navigate to the Code (formerly Models) Page
Use the left-hand navigation menu to click the Code menu item
Add a New Code Object
Create a new model by clicking on the Create New Code Object button in the top-right corner
Enter your new Code Object details
Code objects require knowing the number of inputs and outputs from your code. Those inputs and outputs are provided as data schemas. For example, if your code splits 1 dataset into a two datasets (e.g., train/test split), you will have a to have define a code object with 1 input schema and 2 output schemas. For additional robustness, you can specify actual schema that each dataset will use. Note that you can use the same schema in any of the inputs or outputs.
Pro-tip: If you don't need the additional robustness, you have the convenience to
|
Depending on which Code Object you are trying to create, you will be prompted with different fields to complete. Follow the links below to finish the creation of your Code Object:
- Creating a new Python Code Object
- Creating a new Generalized Code Object
- Creating a new NVFlare Code Object
- Creating a new Interactive Container Code Object
Creating a new Code Object version using the Rhino FCP UI
To create a new version, make sure you are on the page containing the original object you would like to create a new version of. In the box where your original object is in the upper right-hand corner, you should see a + New Version button, like the one shown below:
Click that button and a new dialog should appear that will allow you to create a new version of your object.
Creating a New Version in Every Interface within the Rhino FCP UI
Below is a GIF showing all the interfaces within the Rhino FCP application where you can create a new Version. It displays the Schemas, Cohorts, and Models pages and the + New Version button you will press to create that new version of the schema, cohort, or model you are looking to create.
Creating a new Code Object using the Rhino SDK
Prerequisites
Before starting this process, you should have already:
- Created a Project using the Rhino SDK or UI
- Created an Input Data Schema using the Rhino SDK or UI
- [Optional] Created an Output Data Schema using the Rhino SDK or UI. If you choose not to create an output Data Schema, the system will auto-generate the Data Schema of the output for your Code
Import your Python Dependencies
import rhino_health as rh
from rhino_health.lib.endpoints.code.code_objects_dataclass import (
CodeObject,
CodeObjectCreateInput,
CodeTypes,
CodeRunType
)
import getpass
Log into the Rhino SDK using your FCP Credentials
Your username will be the email address you log into the Rhino FCP platform with.
print("Logging In")
# CHANGE_ME: MY_USERNAME
my_username = "MY_USERNAME"
session = rh.login(username=my_username, password=getpass.getpass())
print("Logged In")
Complete the creation of your Code Object based on the Code Object Type
At this point, you will need the name of your project, your input Data Schema name, and optionally your output Data Schema name. Depending on the type of Code Object you are looking to create, you may need some additional information. For more information on how to create each Code Object type using the SDK, please refer to the following sections within each document:
- Python Code: "Creating a New Python Code Object using the Rhino SDK" in the article Creating a new Python Code Object
- Generalized Compute Code: "Creating a New Generalized Compute Code Object using the Rhino SDK" in the article Creating a new Generalized Compute Code Object
- NVFlare: "Creating a New NVFlare Model using the Rhino SDK" in the article Creating a New NVFlare Model
If you have received an error or run into any issues throughout the process, please reach out to support@rhinohealth.com for more assistance.