server icon indicating copy to clipboard operation
server copied to clipboard

Tests for backend examples

Open alxmamaev opened this issue 2 years ago • 3 comments

I want to create an new backend for triton server, but actually i don't want to every time load so file into triton and then check it, because its a little bit complicated way for tests. I not found any tests examples for any backend.

What is your way to test backends?

alxmamaev avatar Aug 17 '22 10:08 alxmamaev

We do have some tests that test custom backends like L0_backend_identity and L0_dyna_sequence_batcher (which includes a test for a "dyna_sequence" backend). Are you able to clarify your question? It sounds like you don't want to load your built backend into Triton to run tests (e.g. using a script to send requests like we do in our server/qa tests). I don't believe there's a way to do it by running the backend standalone... you'd need to load it into Triton to accurately see how it performs.

In case it's helpful, you can see an example test in the walkthrough of building a custom example here: https://github.com/triton-inference-server/backend/blob/main/examples/README.md#testing-the-recommended-backend

dyastremsky avatar Aug 17 '22 17:08 dyastremsky

@dyastremsky custom backend is a dynamic library with some api methods, so it's mean that we can build some static binary which be able to test all this outputs with Google test for example.

It's sounds easier to development, because you need just do: make, make test instead make, copy library, run server, send test queries

alxmamaev avatar Aug 17 '22 18:08 alxmamaev

Thanks for clarifying, Alexander. We don't currently have an example of an end-to-end or component test using a static library. I'm filing a ticket (DLIS-4084) to investigate this as an enhancement.

dyastremsky avatar Aug 17 '22 18:08 dyastremsky