Skip to content
sleepKIT
Reference
HELIA

evb

Machine-readable model

class

RPC commands

sleepkit/backends/evb.py:15

RpcCommands()

RPC commands

These commands are used to send data to the EVB.

class

sleepkit/backends/evb.py:35

EvbBackend(params: TaskParams) -> None

EVB inference engine backend

This backend leverages Ambiq SoCs to run inference on the edge. The model, inputs, and outputs are sent to the EVB using eRPC.

By default, the backend will scan serial ports looking for the EVB. Therefore, the EVB must be connected and running prior to using this backend.

Parameters of EvbBackend
NameTypeDefaultDescription
paramsHKTaskParamsRequiredTask parameters
method

open

Python

Open connection to EVB

sleepkit/backends/evb.py:54

open()

Open connection to EVB

The following steps are performed:

  1. Scan serial ports for EVB
  2. Connect to EVB
  3. Send model to EVB via eRPC
method

Send model to EVB

sleepkit/backends/evb.py:128

send_model()

Send model to EVB

This method sends the model to the EVB using eRPC. The TFLite flatbuffer will be read from disk and sent to the EVB.

method

Set inputs for inference

sleepkit/backends/evb.py:141

set_inputs(inputs: npt.NDArray)

Set inputs for inference

The inputs are flattened and sent to the EVB using eRPC.

Parameters of set_inputs
NameTypeDefaultDescription
inputsnpt.NDArrayRequiredInputs for inference
method

Get outputs from inference

sleepkit/backends/evb.py:161

get_outputs() -> npt.NDArray

Get outputs from inference

The outputs are fetched from the EVB and converted to a numpy array.

Returns of get_outputs
TypeDescription
npt.NDArraynpt.NDArray: Outputs from inference