mirror of
https://github.com/zml/zml.git
synced 2026-11-16 19:11:09 +00:00
in LLMD and //examples/llm, we compile multiple executable, re-use the args & results. We do all of this manually, in addition we don't have any type-safety on the arguments/outputs which is a bit too easy to misuse IMHO. So adding two abstractions: - Runner: Packs the args, exe and results together to avoid calling `args.set`, `exe.run` and `results.fill` with similar arguments. Today it owns the Exe. It doensn't strictly needs it, but it's simpler and works for us for now. - TypedExe: Type-safe version of an Exe, expecting a single input & ouptut to have keyed arguments to have fully unambiguous arguments & results mapping. I've updated //example/llm with this new pattern. Also adding an explicit `zml.module.CompileError`.
176 lines
6.1 KiB
176 lines
6.1 KiB