Skip to content

Commit

Permalink
Merge pull request #36 from ultravioletrs/computation-export
Browse files Browse the repository at this point in the history
PD-35 - Add computation export and import docs
  • Loading branch information
drasko authored Sep 26, 2024
2 parents c395ae8 + 08dc51f commit 4eed62c
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
Binary file added docs/img/ui/download_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/ui/import_computation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions docs/ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,58 @@ The computations page gives the user the ability to create new computations. The

On the computations page, the user has the ability to view invitations that have been sent to them and either accept or reject the invitation. The computation admin also has the ability to view the users that are a part of the computation and the roles that have been assigned to the different users.

## Computation export and import

Prism allows users to export and import computations in both JSON and CSV formats. When exporting as JSON, all details of a computation are bundled into a single file, which can later be imported to recreate the computation with the provided data. Alternatively, multiple computations can be uploaded using a CSV file, which contains the relevant details for each computation. You can find a sample CSV file in the Prism repository [here](https://github.com/ultravioletrs/prism/blob/main/sample_computations.csv). When importing computations, ensure that all user IDs included in the file are valid and correspond to registered users in the workspace, including both backend and user IDs.

A sample computation that can be uploaded as json is shown:

```json
{
"id": "185e61f4-2fd1-47c3-b8e7-1bf6a8466b79",
"name": "sample_computation",
"description": "sample",
"owner": "f07b7716-2737-4228-9d80-d9df4ab5ee53",
"start_time": "0001-01-01T00:00:00Z",
"datasets": [
{
"provider": "f07b7716-2737-4228-9d80-d9df4ab5ee53",
"hash": "171ae99ff0449d52cd37f824eec20f56d4efbe322e022e1df02a89eabc16209c"
},
{
"provider": "f07b7716-2737-4228-9d80-d9df4ab5ee53",
"hash": "3b8aea5a74d179a445e86ce23d2fc24c8cd65d34f19798cb8852a7bcf945b2ae"
},
{
"provider": "f07b7716-2737-4228-9d80-d9df4ab5ee53",
"hash": "64a6eb1ed400d9b8139d64ef21641e0a930cda8008e21d2b055f1ae91a2c710a"
}
],
"algorithm": {
"provider": "f07b7716-2737-4228-9d80-d9df4ab5ee53",
"hash": "9567a45920974a3261f9e897b3da7e49a391728f607f36f0ad6e8f5ec8a2041b"
},
"result_consumers": ["f07b7716-2737-4228-9d80-d9df4ab5ee53"],
"agent_config": {
"log_level": "debug",
"cert_file": "",
"server_key": "",
"server_ca_file": "",
"client_ca_file": "",
"attested_tls": false
},
"backend_id": "9a8d67b6-9298-4393-81c6-8b7958a8cebf"
}
```

Upload of computations can be done on the computations page, the files accepted are json and csv.

![computation_import](img/ui/import_computation.png)

Any computation can be downloaded by clicking the download button when you view the computation desired.

![computation_download](img/ui/download_computation.png)

## Computation Policies

The computation policies page gives the user the ability to create new computation policies. The user can also view the computation policies they have created and the computation policies that are a part of the project they are in. The user can also update the information of the computation policies they have created. A computation policy is used to determine the roles that are assigned to the different users that are a part of the computation, such as editor, viewer, or admin.
Expand Down

0 comments on commit 4eed62c

Please sign in to comment.