This article explains how to run a Generalized Compute Code object in Rhino FCP.
Note: To learn how to use the Rhino SDK to run a generalized compute code object see Running a Generalized Compute Code Object using the Rhino SDK.
Prerequisites
Create a Generalized Compute code object before you complete these steps. See this article for more details: Creating a New Generalized Compute Code Object.
Running a Generalized Compute Code Object using the Rhino FCP UI
To run a generalized compute code object, complete the following.
- Go to the main project's page and select your project.
- Select Code from the menu on the left to open the Code Objects page.
- Select the Run button for the code object you'd like to run.
- In the Run Settings page, do the following.
- Fill in the following fields within the new Code Run modal:
- Input Dataset(s): One or more Datasets to be used as input to your Code Run. If multiple Datasets are selected, each will be run separately. If a Dataset happens to be a collaborator's Dataset, the code will be run on that collaborator's Rhino Client. In other words, the data never moves outside your collaborator's Rhino Client
- Output Dataset Name Suffix: A suffix that is appended onto the name of each input Dataset to define the name of the output Dataset that will be created during your Code Run
- Timeout in Seconds: The number of seconds that must elapse before a Code Run is automatically halted. This is to avoid zombie tasks that run perpetually within a Rhino client.
-
Run Parameters (Optional): Here you can paste a JSON object that defines additional parameters to be provided to your Code Run. This can be used for specifying hyper-parameters for model validation or any parameter provided to the code. Run parameters are made available to the container code in a file located at
/input/run_params.json
NOTE: Files that you want to run at run-time should be uploaded to the Rhino Orchestrator. See https://docs.rhinohealth.com/hc/en-us/articles/19768490444317-How-to-use-external-files-at-run-time for more details.
To add run time files to your code run, select the run time files from the list of the workgroup run files that appears. You will want to only include the ones you need for the code run, like in the example that follows.
Note that your workgroup run time files include both published and unpublished files. Files from other workgroups only include the files that they have published and have made visible to you and others in your workgroup that share the same persona. (Note that for collaborators to have access to files, they must be published. See Managing Run Time Files to learn how to publish run time files.)
When you have completed adding all your Code Run details, either set the required compute resources by following the instruction in Setting Required Compute Resources (Autoscaling), or click the Run button to run your code.
Setting Required Compute Resources (Autoscaling)
NOTE: This feature is only available if you are running on the Google Cloud Platform (GCP). For NVFlare code objects and code runs, you can adjust autoscaling methods for both the NVFlare Server and the NVFlare Client. For the NVFlare Server, you can only specify the CPU and RAM.
Autoscaling allows Rhino to run Code Runs on additional compute resources when the default Rhino Client capacity is not sufficient. This capability is designed to support resource‑intensive, "bursty"(processing tasks occur in short, intense or irregular spurts), or GPU‑based workloads while improving isolation, reliability, and cost efficiency. With autoscaling enabled, Rhino provisions temporary cloud VMs on demand, executes workloads on those VMs, and automatically terminates them when execution completes.
To help you make more efficient use of your computing resources and save on costs, you can indicate the minimum number of CPUs, amount of RAM, the disk size (VRAM), as well as the type and number of GPUs. You can adjust these settings when you create a code object and also when you run your code. Note that adjustments do not persist and will need to be reset with each run.
To set the required compute resources, complete the following steps.
-
In the Required Compute Resources section, move the
No minimum, allow any compute requirements slider to the right.
The compute resources that can be changed become visible.
- Next, make changes to the settings as needed. Note that these settings changes do not persist the next time you run the code object or the code run. The settings are explained below.
| Setting | Description | Usage Notes |
| CPU MIN | The minimum number of CPU cores on which your code will be run. | If the CPU MIN is too low, you might see slow code execution or throttling. |
| RAM MIN | The minimum amount of RAM (main memory) that you want to allocate to running your code. | If this is too low, you might see an out-of-memory crash or slowness in execution due to disk swapping. |
| DISK SIZE | Amount of storage allocated to the instance. | Increasing this setting increases capacity (not necessarily speed) |
| GPU TYPE | The model of GPU hardware. The number of GPUs indicate the number of GPUs attached to the instance. | If your code isn’t written to use multiple GPUs, extra GPUs might not be used. Note that GPU availability depends on the selected cloud region, Project‑level GPU quotas, and the current capacity at the cloud provider. |
- Select Run without GPU if no GPU instance is available if your code supports CPU fallback, or if your GPU capacity is limited, but you are fine with slower results. This option can be good if you are debugging or testing, running small datasets, or running inference for small batches.
- Select Always create a new virtual machine allows GCP. By default a new virtual machine is always created at runtime.
- When complete, click Create New Code Object or start a Code Run.
Troubleshooting Code Runs
Error Message that Usage Limit Has Been Exceeded
If you get an error message indicating that the usage limit has been exceeded, your administrator has set usage limits on the number of input rows a workgroup can process per model within a certain timeframe. Getting this message means that the entire run has been cancelled. Please contact your administrator for more details and help with resolving the issue.
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.