Skip to content

Commit

Permalink
docs: add doc about triton
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Jul 8, 2024
1 parent af8a9f7 commit 3a6fcb3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions doc/explanations/triton.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Triton inference server

We use the [Triton Inference Server](https://github.com/triton-inference-server/) to serve ML models.

Models are exported in ONNX format (or SavedModel for some specific models trained with Tensorflow), and added in the `models/triton` directory.

Triton expects the models to be in a specific directory structure, with the model files in a subdirectory named after the model. For example, the model `my_model` should be in a directory named `my_model` in the `models/triton` directory.
Each model version should be in a subdirectory named after the version number, for example `1`.

Triton offers APIs in HTTP and gRPC. Robotoff uses the gRPC API to communicate with the server.

Triton possesses several model management mode, we use the 'explicit' mode. In this mode, the server does not load any model by default, and models must be explicitly loaded and unloaded by the client.
We ask Triton to load all the models in the `models/triton` directory at startup.

Using this mode, we don't have to restart the server when we add or remove models.

Once a new model directory is added, you can load it with the following command (within the triton container):
```bash
curl -X POST localhost:8000/v2/repository/models/${MODEL_NAME}/load
```

0 comments on commit 3a6fcb3

Please sign in to comment.