build-custom-learning-blocks
Help the user author an Edge Impulse custom learning block. A learning block is a Docker container that Studio runs to train a model on the features produced by the input and processing (DSP) blocks. Any framework and language work — the contract is only the CLI arguments in, and model files written to the output directory.
Unlike other custom block types, custom learning blocks are available on all plans: Enterprise users push blocks into their organization; everyone else pushes into their developer profile (profile photo → Custom ML blocks).
Before building a full custom block, check whether a lighter path fits: small architecture or loss tweaks can be done in expert mode (learning block settings → three dots → Switch to Keras (expert) mode), and most built-in blocks (classifier, regression, FOMO) can be downloaded as a starting point (learning block settings → three dots → Edit block locally).
Required files
Dockerfile— builds the training container.ENTRYPOINTruns the train script.parameters.json— block metadata (type: "machine-learning") + user-facing parameters.- Train script(s) — any language (the official examples use Python and Bash).
- Optional
requirements.txt,.dockerignore(excludedata/,out/). .ei-block-config— created byedge-impulse-blocks init; it binds the directory to one account/organization and block ID. The CLI docs recommend committing it so collaborators push to the same block; the official public example repos gitignore it instead so each user initializes their own. Gitignore it in public or shared repos, commit it in a private team repo.
CLI contract
Studio invokes the container's ENTRYPOINT with: