Skip to content

Commit

Permalink
Fix table add diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
bojidar-bg committed Oct 19, 2024
1 parent 2572a3f commit 8fa506f
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion packages/backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,40 @@ The AI questionaire backend is an iExec application responsible for taking the i

Unfortunatelly, despite all our attempts to get that working with iExec, the only thing we could go working is a mock node.js version, which can be found in [`./node-mocked`](,/node-mocked). Everything else failed in one way or another, and this part of the repository is here to document the various ways in which we couldn't get it to work.

## Architecture


```mermaid
flowchart
subgraph User
UserUser[User]
UserUser ---|Survey Answers| Prompt
ResultList
end
subgraph iExec
subgraph DataProtectorCore
Prompt ---|ProtectData| PromptDataset
end
UserUser ---|ProcessData| Backend
subgraph Backend
PromptDataset --> PromptFile
PromptFile --> Exec
Model --> Exec
Exec --> Results
Results ---|ProcessDataResult| ResultList
end
end
```

## List of attempts

| # | Attempt name | Description | Status |
| --- | --- | --- | --- |
| 1 | [`python-sconify`](./python-sconify) | An attempt to follow iExec's [Build your first application with Scone framework](https://protocol.docs.iex.ec/for-developers/confidential-computing/intel-sgx-technology) documentation. | :x: DCAP validation fail on both Prod and Debug workerpools. |
| 2 | [`python-transformers`](./python-sconify) | An attempt to use the Huggingface [`transformers`](https://huggingface.co/docs/transformers/index) library for the AI model. | :o: Abandonded as we experiment with simpler Python SGX examples first |
| 3 | [`python-gramine`](./python-gramine/) | Attempt to use Gramine instead of Scone following the iExec's unlisted [Build a Gramine application](https://github.com/iExecBlockchainComputing/documentation/blob/v8-staging/for-developers/confidential-computing/create-your-first-gramine-app.md) documentation. | :x: iExec does not support Gramine at the moment |
| 4 | [`node-mocked`](./node-mocked) | The default hello World" app generated by [`idapp-cli`](https://www.npmjs.com/package/idapp-cli) | :check: Deployed as **`0x05F88328fAe2Ac1271C68f2E65864692c3AD9B0A`** |
| 4 | [`node-mocked`](./node-mocked) | The default hello World" app generated by [`idapp-cli`](https://www.npmjs.com/package/idapp-cli) | :heavy_check_mark: Deployed as **`0x05F88328fAe2Ac1271C68f2E65864692c3AD9B0A`** (but does no AI) |
| 5 | [`nodejs-transformers.js`](./nodejs-transformers.js/) | An attempt to use the [transformers.js](https://huggingface.co/docs/transformers.js/index) library by Huggingface. | :x: SCONE's Node.js version (14) is too old to support transformers.js. |
| 6 | [`nodejs-execFile`](./nodejs-execFile/) | An attempt to use the [`llamafile`](https://github.com/Mozilla-Ocho/llamafile) executable with the Node version we have | :x: SCONE limitations: ENOSYS when attempting to spawn the process. |
| 7 | `nodejs-wllama` | An attempt to use the [`@wllama/wllama`](https://huggingface.co/spaces/ngxson/wllama) library (also based on `llama.cpp`) for inference. | :x: SCONE's Node.js version (14) doesn't support the [WebAssembly exception handling extension](https://webassembly.github.io/exception-handling/js-api/) wllama requires. |
Expand Down

0 comments on commit 8fa506f

Please sign in to comment.