Archived: This repository is no longer maintained and will not receive updates or security fixes. It belongs to an earlier version of wasmCloud. For current wasmCloud, see https://github.com/wasmCloud/wasmCloud.
This repository shall drive the progress towards a support of ML functionality. The following list reflects the conclusions from the wasmCloud-ml meeting from 2022-01-11.
- Scope, what to aim for
- Design decisions
- Illustration of a corresponding application
- Inference shall be IN scope
[Information] Other actions which are typical for the discipline of machine learning shall deliberately be excluded, e.g. training and data exploration.
The Inference API actor (IAPI) shall
- be linked to a HTTP server (http)
- expose a public API for requesting inference actions.
- validate its input
- make actor-to-actor calls to an inference actor (I)
- translate internal results to public HTTP output
The Inference Actor (I) shall
- await actor-to-actor calls to perform actions
- perform any necessary validation on an incoming call
- request inference processing from the inference engine (IE) and return results
The Inference Engine Capability Provider (IE) shall
- expose a WASI-NN like style contract to make inference engine requests
- use a model path to fetch model data from a bindle server
- interact with some form of inference engine via Rust crate
The bindle server shall
- Be deployed "out of the box" as is as a standalone entity for storing/exposing models
- reference the respective model via a model path
An incoming request (1) at the HTTP server (http) is forwarded to the Inference API actor (IAPI) where the input of the request is validated and routed to the Inference actor (I). The Inference actor (I) triggers an inference processing at the Inference Engine (IE). If the Inference Engine did not yet download the corresponding model, it does so by providing a model path (5) to a bindle server and returning a model (6). The inference result is forwarded (7) to the Inference actor (I) where it is routed (8) back to the Inferenc API actor (IAPI) and finally provided (9) as a response to the request (1) to the HTTP server (http).
The model path can be defined in the link definition for the link between the Inference actor (I) and the Inference Engine (IE) such that it is passed to the Inference Engine (IE) when the link is established. Additionally, a link name can be defined in the link definition.
This allows a model to be addressed upstream, e.g. in the incoming request (1) of the HTTP server, by a human readable nick name and at the same time it can be referenced downstream from the Inference Engine (IE) in the bindle server.

