Migration Guide¶
This guide will help you migrate from other frameworks to mosec.
From the Triton Inference Server¶
Both PyTriton and Triton Python Backend are using Triton Inference Server.
mosecdoesn’t require a specific client, you can use any HTTP client librarydynamic batching is configured when calling the
append_workermosecdoesn’t need to declare theinputsandoutputs. If you want to validate the request, you can use theTypedMsgPackMixin(ref Validate Request)
Triton Python Backend¶
change the
TritonPythonModelclass to a worker class that inheritsmosec.Workermove the
initializemethod to the__init__method in the new classmove the
executemethod to theforwardmethod in the new classif you still prefer to use the
auto_complete_configmethod, you can merge it into the__init__methodmosecdoesn’t have the correspondingfinalizemethod as an unloading handlermosecdoesn’t require any special model directories or configurationsto run multiple replicas, configure the
numinappend_worker
PyTriton¶
move the model loading logic to the
__init__method, since this happens in a different processmove the
infer_funcfunction to theforwardmethod