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
.
mosec
doesn’t require a specific client, you can use any HTTP client librarydynamic batching is configured when calling the
append_worker
mosec
doesn’t need to declare theinputs
andoutputs
. If you want to validate the request, you can use theTypedMsgPackMixin
(ref Validate Request)
Triton Python Backend
¶
change the
TritonPythonModel
class to a worker class that inheritsmosec.Worker
move the
initialize
method to the__init__
method in the new classmove the
execute
method to theforward
method in the new classif you still prefer to use the
auto_complete_config
method, you can merge it into the__init__
methodmosec
doesn’t have the correspondingfinalize
method as an unloading handlermosec
doesn’t require any special model directories or configurationsto run multiple replicas, configure the
num
inappend_worker
PyTriton
¶
move the model loading logic to the
__init__
method, since this happens in a different processmove the
infer_func
function to theforward
method