> 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/managing-run-time-files.md).

# Managing Run Time Files

How to view, add, publish, unpublish, and delete external run time files.

**Run Time Files** are external files that can be used when you run code objects.&#x20;

The **Run Time Files** page lists the run time files that have been uploaded to the shared space for your workgroup, showing the folders they are stored in, and whether they are unpublished or published.

***

### Viewing Run Time Files

To **View** run time files for your workgroup, select **Code** from the menu on the left, then select the **Run Time Files** tab.

![](https://content.gitbook.com/content/ydySyCBmy6F7NnGn4bPa/blobs/g8lAUHCsQVbvlS7TRbuH/30677601767837)

Folders and run-time files are listed.

<table><thead><tr><th width="80.8125">Icon</th><th>Description</th></tr></thead><tbody><tr><td><img src="https://2949362692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FydySyCBmy6F7NnGn4bPa%2Fuploads%2FrecACTGw0Aj4LLj1h7Cr%2FIcon_Unpublished.png?alt=media&amp;token=390fe619-d52a-4561-a3a4-55fdfaf86a14" alt="" data-size="line"></td><td>The file is unpublished. If this icon appears next to a folder, then all files in that folder are unpublished.</td></tr><tr><td><img src="https://2949362692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FydySyCBmy6F7NnGn4bPa%2Fuploads%2FAnxLN2D4pZ7PuEDkyeAF%2FIcon_Published.png?alt=media&amp;token=b0dba261-aa55-47bd-a572-380c98925da1" alt="" data-size="line"></td><td>The file is published. If this icon appears next to a folder, then all files in that folder are published.</td></tr><tr><td><img src="https://content.gitbook.com/content/ydySyCBmy6F7NnGn4bPa/blobs/7ygEygctpDYgskhuP8eQ/30677594171037" alt="" data-size="line"></td><td>The folder contains published and unpublished files.</td></tr></tbody></table>

{% hint style="info" %}
**Note:** If you belong to [multiple workgroups](/settings/about-multiple-workgroups.md), the **Runtime Files** page will only display files from your **currently active workgroup**, regardless of whether those files have been published or not.

Runtime files **published by collaborators** in other workgroups may still be available for use in your project. You will be able to select these files when running a Code Object, but they will **not** appear on the Runtime Files page unless you have access to the Code Artifacts bucket where they are stored.
{% endhint %}

***

### Accessing the Code Artifacts Bucket

Runtime files are stored in your workgroup's **code artifacts bucket**.

The S3 code artifacts bucket is created by Rhino (on client request) as part of the onboarding process - you don't create or manage this bucket yourself.

If you don't already have one and would like one created, contact us at <support@rhinofcp.com>.

{% hint style="warning" %}
The code artifacts bucket is owned by Rhino. **Please DO NOT upload sensitive information such as proprietary datasets.** For sensitive data, please use the instructions in [Registering, Configuring, and Exporting Datasets](/datasets/registering-configuring-and-exporting-datasets.md) instead.
{% endhint %}

You can find the code artifacts bucket in your settings page under **Containers & Artifacts**:

{% stepper %}
{% step %}
In your project, select the **Settings** button (it looks like a sprocket at the bottom left side of the page.

![](https://content.gitbook.com/content/ydySyCBmy6F7NnGn4bPa/blobs/4u8WYSy0sa9q2HlrHo1O/34593373401629)
{% endstep %}

{% step %}
In the Settings menu, which is near the top of the screen on the left side of the window, select **Containers & Artifacts**.

![](https://content.gitbook.com/content/ydySyCBmy6F7NnGn4bPa/blobs/CdMN4MNmiJMWrQAzYeHs/34593373402397)
{% endstep %}

{% step %}
Your **storage bucket** and **bucket prefix** appear in the *Workgroup code and model artifacts storage* part of the page.&#x20;

Under *Container Registry Access***,** you can also **Reveal Credentials** to see your AWS ID and secret access key.
{% endstep %}
{% endstepper %}

***

### Adding Runtime Files

Add external runtime files by adding them to the code artifacts bucket.

There are many different ways to [upload files to an AWS S3 bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/upload-objects.html). For convenience, Rhino has created a utility script, which is accessible via our user-resources repo: [upload-file-to-s3.sh](https://github.com/RhinoHealth/user-resources/blob/f2d3107eb85ab2abb4fb68ef25bd3f92538d0ed1/utils/upload-file-to-s3.sh)

**How to Use this Script**:

{% stepper %}
{% step %}

### Configure

Set your AWS S3 credentials as environment variables in your terminal (these can be found on the FCP UI under **Settings -> Containers & Artifacts -> Container Registry Access**):

```bash
export AWS_ACCESS_KEY_ID=<ENTER_YOUR_ID>
export AWS_SECRET_ACCESS_KEY=<ENTER_YOUR_KEY>
```

{% endstep %}

{% step %}

### Run Script

From the `utils/` directory the script is located in, call it with 4 arguments:

```bash
./upload-file-to-s3.sh <upload_directory> <storage_bucket> <bucket_prefix> <path_in_bucket>
```

* `<upload_directory>` - the local folder whose contents you want to upload.
* `<storage_bucket>` - the name of your workgroup's S3 bucket.
* `<bucket_prefix>` - your workgroup's fixed prefix inside that bucket.
* `<path_in_bucket>` - the subfolder, under your prefix, to upload into. **This is the path you'll reference in your code objects**

For example, uploading a local folder `./original_location` into a subfolder called `my_files`:

```bash
./upload-file-to-s3.sh ./original_location <storage_bucket> <bucket_prefix> my_files
```

{% endstep %}
{% endstepper %}

***

### Referencing Runtime Files in Your Code

When creating your code object, you can reference your external files by referencing them in the following path:

```
/external_data/the_folder_in_s3_storage_bucket/filename
```

For the example above, assuming you uploaded `model_params.txt` file under `my_files`, the file would be accessible during runtime in

```
/external_data/my_files/model_params.txt
```

An example of Python code to read your file data into a `text` variable would look like as follows:

```python
from pathlib import Path
     text = Path('/external_data/my_files/model_params.txt').read_text()
```

Once your code points to your external files, and the code object is created, you can run the code and specify the files you want to use in your code run.&#x20;

In the **FCP** **UI**, you can simply select them from a dropdown:

![](https://content.gitbook.com/content/ydySyCBmy6F7NnGn4bPa/blobs/JdWjzEPWJdU9VEuhOWNr/19768498689565)

Alternatively, you can also reference them via **SDK**. See this [notebook](https://github.com/RhinoHealth/user-resources/blob/main/examples/rhino-sdk/runtime_external_files.ipynb) for an example.

***

### Checkpoints

{% hint style="info" %}
As you train your NVFlare models, checkpoint and model parameter files are added to the Run Time Files page automatically.
{% endhint %}

![](https://content.gitbook.com/content/ydySyCBmy6F7NnGn4bPa/blobs/y9eMmDSab3wk7BlDTu78/31364001984925)

**Checkpoint files** are complete snapshots of a federated learning training run, shown as a list.&#x20;

Each file contains model parameters, internal optimizer states, and training metadata such as the current training round. You will also see a models parameter file.&#x20;

You can publish, unpublish, or delete these files, as you would any other file.

***

### Adding Descriptions or Notes to Runtime Files

If you want to add a description or note to a runtime file, move your pointer over the file. A box appears; select the pencil to enter the description, then click Save.

![](https://content.gitbook.com/content/ydySyCBmy6F7NnGn4bPa/blobs/rfgmKxqthmJ7fgzxLYjm/31364050783389) ![](https://content.gitbook.com/content/ydySyCBmy6F7NnGn4bPa/blobs/75eEY4FAqJ2emBjG0kHo/31364050784925)

***

### Publishing Run Time Files

{% stepper %}
{% step %}
**Open the Run Time Files page.**

Select Code from the left menu, then clicking the run time files link.

![](https://content.gitbook.com/content/ydySyCBmy6F7NnGn4bPa/blobs/pOrGHtj8Eegw7SkeHiwK/30677601773085)
{% endstep %}

{% step %}
**Select the files and publish them.**

Click the check box next to the files you want to publish, then click the **Publish** button.
{% endstep %}
{% endstepper %}

***

### Unpublishing Run Time Files

{% stepper %}
{% step %}
**Open the Run Time Files page.**

Select Code from the left menu, then clicking the run time files link.

![](https://content.gitbook.com/content/ydySyCBmy6F7NnGn4bPa/blobs/PldpadLuVYshAFhb6qbt/30677601774877)
{% endstep %}

{% step %}
**Select the files and unpublish them.**

Select the checkbox next to the file(s) you want to unpublish, then select the **Unpublish** button.
{% endstep %}
{% endstepper %}

***

### Deleting Run Time Files

{% stepper %}
{% step %}
**Open the Run Time Files page.**

Select Code from the left menu, then clicking the run time files link.

![](https://content.gitbook.com/content/ydySyCBmy6F7NnGn4bPa/blobs/PldpadLuVYshAFhb6qbt/30677601774877)
{% endstep %}

{% step %}
**Select the files and delete them.**

Select the checkbox next to the file(s) you want to delete, then select the **Delete Files** button.
{% endstep %}
{% endstepper %}


---

# 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/managing-run-time-files.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.
