diff --git a/docs/assets.md b/docs/assets.md new file mode 100644 index 0000000..cd40370 --- /dev/null +++ b/docs/assets.md @@ -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. diff --git a/docs/img/asset_association.png b/docs/img/asset_association.png new file mode 100644 index 0000000..53692f6 Binary files /dev/null and b/docs/img/asset_association.png differ diff --git a/docs/img/asset_computation.png b/docs/img/asset_computation.png new file mode 100644 index 0000000..bd2dd24 Binary files /dev/null and b/docs/img/asset_computation.png differ diff --git a/docs/img/asset_computations.png b/docs/img/asset_computations.png new file mode 100644 index 0000000..e966bf6 Binary files /dev/null and b/docs/img/asset_computations.png differ diff --git a/docs/img/asset_management.png b/docs/img/asset_management.png new file mode 100644 index 0000000..e2920d9 Binary files /dev/null and b/docs/img/asset_management.png differ diff --git a/docs/img/asset_view.png b/docs/img/asset_view.png new file mode 100644 index 0000000..4f2d215 Binary files /dev/null and b/docs/img/asset_view.png differ diff --git a/docs/img/newAsset.png b/docs/img/newAsset.png new file mode 100644 index 0000000..a56e6cf Binary files /dev/null and b/docs/img/newAsset.png differ diff --git a/docs/img/new_asset_modal.png b/docs/img/new_asset_modal.png new file mode 100644 index 0000000..16db0d0 Binary files /dev/null and b/docs/img/new_asset_modal.png differ diff --git a/mkdocs.yml b/mkdocs.yml index 8b81e4a..af6098d 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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