Skip to content

Commit

Permalink
add asset docs:
Browse files Browse the repository at this point in the history
Signed-off-by: WashingtonKK <[email protected]>
  • Loading branch information
WashingtonKK committed Oct 14, 2024
1 parent 4eed62c commit a63b25b
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 0 deletions.
67 changes: 67 additions & 0 deletions docs/assets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Computation Assets Overview

Computation assets on Prism provide a convenient way to manage essential computational resources—datasets and algorithms. These assets facilitate basic operations such as creation, reading, updating, and deletion (CRUD). They can also be associated with or unlinked from a computation.

An important distinction is that computation assets contain file samples of the algorithm or dataset, providing users with a guide on what the actual files will resemble. These samples are **not** the actual files sent to the computation manifest when uploading via the CLI. For this reason, the actual file’s checksum is required during asset creation.

A single asset can be used in multiple computations (one-to-many relationship), and a computation can be linked to several assets.

## Asset Usage

### 1. **Creating a New Asset**

To create a new asset:

1. Navigate to the **Assets** page.
2. Click the **New Asset** button to open the asset creation modal.

![Create asset](img/newAsset.png)

The only mandatory fields during asset creation are:

- **File Hash**: The checksum of the actual file (not the sample).
- **Asset Description**: A brief summary of what the asset represents.

The **File Name** field is optional. If provided, it will be used as the file name when running the computation (not the name of the sample file).

![New Asset Modal](img/new_asset_modal.png)

Once created, the asset will appear in the asset list, where you can perform further actions such as downloading the asset or associating it with a computation.

![Asset Management](img/asset_management.png)

**Note**: The file sample uploaded should not exceed 10 MB in size.

### 2. **Associating an Asset with a Computation**

To associate an asset with a computation, the user must first be added as a **provider** to that computation. An algorithm provider can only link assets of type **algorithm** to computations where they have been added as a provider.

Steps for association:

1. Ensure the computation has been created and the user has been added to it.
2. Click the **Associate** button on the asset.
3. In the search bar, search for the computation to associate the asset with.

![Associate Computation](img/asset_association.png)

4. Once the correct computation is found, select it and click **Associate**.

![Associated Computations](img/asset_computations.png)

Multiple computations can be linked to a single asset. All associated computations will be listed as pills in the computation(s) section.

To **unlink** an asset from a computation, click the **Unlink** button next to the computation you wish to de-associate from the asset.

### 3. **Viewing and Downloading Asset Samples**

If an asset sample has been uploaded, users can either view it directly on Prism or download it for inspection later. This can be done by clicking the asset name or the **View** button in the assets list.

![View Asset](img/asset_view.png)

### 4. **Running a Computation**

Once all assets have been successfully associated with a computation, they will be listed within the computation’s structure. At this point, the user is required to upload their **public keys** to proceed.

![Computation Page](img/asset_computation.png)

After the public keys and other necessary requirements have been provided, the computation can be executed. During execution, the computation service will retrieve the associated assets from the database and add them to the computation manifest, which is then sent to the manager.
Binary file added docs/img/asset_association.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/asset_computation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/asset_computations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/asset_management.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/asset_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/newAsset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/new_asset_modal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ nav:
- Billing: billing.md
- Computations: computations.md
- Computation Policies: policies.md
- Assets: assets.md
- Users: users.md
- Projects: projects.md
- UI: ui.md
Expand Down

0 comments on commit a63b25b

Please sign in to comment.