Have you ever come across the following issues and wanted to implement an operator on your own?
- The threshold settings of the embedded operator are not up to scratch.
- The embedded operator models do not meet the precision requirements.
- I find a novel SOTA model from a latest paper.
- I'm fine tuning specific fields of the commonly used models.
- Proficient in Python programming.
- Intimate knowledge of gRPC and protobuf.
- Command of basic Docker commands.
To customer an operator:
- Prepare a model.
- Implement an gRPC interface under the rpc directory.
- Tune and package it to a Docker image.
From example-custom-operator, you can see a simplest directory structure of an operator.
- The data directory holds scripts for downloading model files. When you download an image file, it is used to download models.
- The rpc directory holds python files generated by gRPC.
- The server file under the main directory keeps logics related to gRPC server.
- The custom_operator file under the main directory provides interfaces required by the rpc file.
You can find proto files here.
You need to implement a total of three interfaces.
- Execute: Runs this operator.
- Healthy: Checks if the operator is up running.
- Identity: Returns information of the operator, such as name, type, and port.