> For the complete documentation index, see [llms.txt](https://docs.rhinofcp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rhinofcp.com/creating-and-running-code-objects/what-is-a-code-run.md).

# What is a Code Run?

A **Code Run** object encapsulates vital information pertaining to a specific code object run within the Rhino FCP.&#x20;

The Code Run provides relevant information about ongoing and terminated runs, providing a comprehensive view of the run's execution and outcomes.

***

## Practical Application

Imagine you've run complex federated training with the NVFlare Code Object.&#x20;

By accessing the Code Run object associated with this run, you can review the input Datasets, output Datasets, configuration details, and execution time and delve into the Code Run logs.&#x20;

This comprehensive understanding empowers you to make informed decisions, validate results, and optimize future model runs.

***

## Key Aspects and Functions

{% stepper %}
{% step %}

#### Code Run Logs

One of the primary functions of the Code Run object is to provide seamless access to Code Run logs. These logs offer a detailed record of the run's execution at each relevant Rhino Client, facilitating troubleshooting, validation, and performance evaluation.
{% endstep %}

{% step %}

#### Input and Output Datasets

The Code Run object provides clear visibility into the input Datasets used for the run, as well as the naming conventions for the generated output Datasets. This transparency promotes effective traceability.
{% endstep %}

{% step %}

#### Runtime Insights

Access runtime information within the Code Run, including the time taken for the model to complete its execution. This insight aids in gauging performance and optimizing future runs.
{% endstep %}

{% step %}

#### Report Creation and Accessibility

Users have the flexibility to generate reports related to the model run and make them accessible via the *Code Run* object. This feature aids in sharing insights and outcomes with collaborators or stakeholders.
{% endstep %}
{% endstepper %}

***

## Key Components

{% hint style="info" %}
You can search for relevant Code Runs based on Name (of associated Code Object), UID, and/or Description
{% endhint %}

<figure><img src="https://2949362692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FydySyCBmy6F7NnGn4bPa%2Fuploads%2F6e2o258eYA3RXbqu1cEQ%2Fimage.png?alt=media&amp;token=e6be36b8-d217-4ca3-844c-53224386c13e" alt=""><figcaption></figcaption></figure>

{% stepper %}
{% step %}

#### Name

The name of the associated Code Object
{% endstep %}

{% step %}

#### Description (Optional)

The description of the Code Run
{% endstep %}

{% step %}

#### Type

The type of Code Object that has been run to produce the Code Run.&#x20;

In the case of NVFlare Code Runs, this will designate whether the Code Run row represents NVFlare Training (T) or NVFlare Validation (V).
{% endstep %}

{% step %}

#### Run Time (UTC)

The two timestamps for when the Code Run was started and ended in the UTC timezone
{% endstep %}

{% step %}

#### Status

The status of the Code Run, the value can be one of the following:&#x20;

* Running
* Complete: Success
* Complete: Error
* Halted: Success
* Halted: Failure
  {% endstep %}

{% step %}

#### Code Object Version

The version of the Code Object that was run to produce the Code Run
{% endstep %}

{% step %}

#### Input Datasets

A link to the Dataset Analytics view within the Datasets page showing all the input Datasets that were selected to run during the code's execution.&#x20;

If you hover over the link, you will see a list of the names of each input Dataset as well
{% endstep %}

{% step %}

#### Output Datasets

A link to the Dataset Analytics view within the Datasets page showing all the output Datasets that were selected to run during the code's execution.&#x20;

If you hover over the link, you will see a list of the names of each output Dataset as well
{% endstep %}

{% step %}

#### Report

A link to a report for the Code Run.&#x20;

Reports by default are blank and meant to be a playground for users to output performance metrics they are especially interested in. Reports are created using the Rhino SDK.
{% endstep %}

{% step %}

#### Logs

If you click on a code run, you will see the logs that were produced during the execution of the code.&#x20;

By default, the logs show stdout and stderr for the central orchestrator, as well as each associated client edge node. This can be extremely helpful for debugging.

{% hint style="info" %}
Each site sets its own permissions to "View Client Side Logs"
{% endhint %}
{% endstep %}

{% step %}

#### UUID

The unique identifier for a specific Code Run within the Rhino FCP.&#x20;

You can find this by clicking on the 3 dots next to the corresponding code run and selecting "Copy UID".
{% endstep %}
{% endstepper %}

***

## Leveraging Code Runs

To make the most of Code Runs within the Rhino FCP, consider the following:

{% stepper %}
{% step %}

#### Comprehensive Analysis

Code Runs provide a holistic view of code executions, enabling you to analyze the effectiveness and outcomes of various runs.
{% endstep %}

{% step %}

#### Troubleshooting and Validation

Access Code Run logs to identify and address issues, ensuring the integrity and accuracy of your analyses.
{% endstep %}

{% step %}

#### Collaborative Sharing

Generate reports from the Code Run object to share insights with collaborators, enhancing collaborative research efforts.
{% endstep %}
{% endstepper %}

***

## Code Run Usage Limits

Usage limits can be placed on the number of input rows (inferences) a workgroup can process per model within a certain timeframe. This helps protect intellectual property by mitigating the risk of model weight reconstruction.&#x20;

Usage limits also control cloud costs by enabling sites to cap usage and control variable cloud costs associated with ad-hoc Code Runs that project collaborators could possibly trigger.&#x20;

All accrued usage counters reset to zero at 00:00 UT on the first day of every calendar month.&#x20;

Contact Rhino at <support@rhinofcp.com> if you would like to enable this feature in your project.

***

## Summary

Code Runs serve as the cornerstone of informed data analysis within the Rhino FCP. By encapsulating run configurations, runtime insights, logs, and reporting capabilities, the Code Run object empowers you to derive meaningful insights, troubleshoot effectively, and collaborate seamlessly with others. It's your gateway to unlocking the potential of your model executions.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.rhinofcp.com/creating-and-running-code-objects/what-is-a-code-run.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
