Xilinx / inference-server

https://xilinx.github.io/inference-server/
Apache License 2.0
43 stars 13 forks source link

Update examples #85

Closed varunsh-xilinx closed 2 years ago

varunsh-xilinx commented 2 years ago

Summary of Changes

Closes #84

Motivation

The examples are intended to show new users a simplified sample of how to interact with the server, not as a tool to benchmark and profile the different backends. The edited examples are structured similarly to each other to show users how similar making inferences to different models can be. Future examples can be added to demonstrate different features.

Implementation

The examples are now sorted into directories by type rather than by language. The ResNet50 examples in particular span the gamut of C++ and Python across all the backends. They are intentionally repetitive to be standalone and complete. The ResNet50 example is accompanied by a document on the online documentation that shows the different steps. The other models are currently not online as I'm unsure what needs to be highlighted about them and how it should be done.

The validation script for resnet50 is moved to tests/validation. Currently, it only works with migraphx but should be generalized to all backends as well as add timing information.

gbuildx commented 2 years ago

Build failed!

varunsh-xilinx commented 2 years ago

retest this please

gbuildx commented 2 years ago

Build failed!

gbuildx commented 2 years ago

Build failed!

varunsh-xilinx commented 2 years ago

retest this please

gbuildx commented 2 years ago

Build failed!

varunsh-xilinx commented 2 years ago

These repeated failures are due to the pipeline timing out because of increased load on the pipeline server. The tests pass locally so I'm merging it to address #86. If there are any issues, they'll be patched in a new PR.

gbuildx commented 2 years ago

Build failed!

bpickrel commented 2 years ago

General feedback:

varunsh-xilinx commented 2 years ago

I can add a bit more about the multi-channel input/output in the comments. Same thing for the names

Your migraph_resnet script is in tests/validation and it still sends requests in batches of 64. I did try running it for a few iterations. It runs that far at least. Killing it with Ctrl+C doesn't work (or maybe it takes a while, not sure) but you can background the process with Ctrl+Z first and then kill it.

I did think about explaining batch size and timeout but if I'm assuming someone brand new is looking at this example, I don't know if they have enough context to really know what that means. I can put a little bit but I think it has to be a pointer to somewhere else for more details. I was thinking of having these parameters listed somewhere else (e.g. each worker having a page listing its specific quirks like how the migraphx worker is compiling to mxr under the hood) since they're worker-specific. The batcher level ones like timeout can be elsewhere since those are shared

gbuildx commented 2 years ago

Build failed!