Creating a New NVFlare Code Object Using the Rhino SDK
To create new NVFlare Code or a Code version using the Rhino SDK, complete the following steps.
Note: To learn how to create new NVFlare Code or a Code versions with the Rhino FCP UI, see Creating and Running NVFlare Code and Running Inference.
Prerequisites
Before starting this process, you should have already:
Created a Project using the Rhino SDK or the User Interface (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 getpassNote: Remember to change all lines with CHANGE_ME comments above them in all the blocks below.
Log into the Rhino SDK using your FCP Credentials
Your username will be the email address you log into the Rhino FCP platform with.
Getting Started Creating Your NVFlare Code
To create NVFlare Code using the Rhino SDK, you will need to first push a container to your workgroup's ECR. Note the name you use for your container image while pushing; you will need to include it in your code below. You will also need your ECR workgroup. If you need help with client storage setup, please refer to Mounting Storage to Your Rhino Client
Get Supporting FCP Information Needed to Create Your Code
At this point, you will need the name of your project, your input Data Schema name, optionally, your output Data Schema name, and your ECR workgroup name. For guidance related to client storage setup, please refer to Mounting Storage to Your Rhino Client. You can also retrieve each object's UUID by following the instructions here: Frequently Asked Questions (FAQs)
Create your NVFlare Code Object using the Container You Just Pushed
During the creation of your CodeObject, you will provide it with various pieces of data similar to how Code is created within the UI. You will give the CodeObject a name, description, input_data_schema_uids, output_data_schema_uids, project_uid, code_object_type, and the config where you will provide the name of the container you just pushed.
Getting Help
If you have received an error or run into any issues throughout the process, please reach out to support@rhinohealth.com for more assistance.
Last updated
Was this helpful?