moe-plugin-sdk 1.3.6

Stable SDK for building third-party MoE-13 inference plugins.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use anyhow::Result;
use crate::context::PluginContext;
use crate::types::PluginType;
use moe_core::model_adapter::umil::cmir::CMIR;
use moe_core::model_adapter::umil::traits::ModelStream;

pub trait MoePlugin: Send + Sync {
    fn id(&self) -> &str;
    fn version(&self) -> semver::Version;
    fn plugin_type(&self) -> PluginType;

    fn initialize(&mut self, context: &PluginContext) -> Result<()>;

    fn ingest(&self, stream: Box<dyn ModelStream>) -> Result<CMIR>;

    fn shutdown(&self);
}