Xilinx / inference-server

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

Implement missing C++ methods in Python #88

Closed varunsh-xilinx closed 2 years ago

varunsh-xilinx commented 2 years ago

Summary of Changes

Closes #87

Motivation

This PR brings the Python API in line with C++ (with a few exceptions as noted below). The pre- and post-processing functions are pulled out of the util namespace into their own namespace pre_post. That way, they can be optionally distributed as a separate shared library. The util namespace is still used and contains code that is otherwise generic. Since it's used throughout, having it as a separate library was pointless since it was always linked to anyway.

Implementation

The Python API now adds more client operators (the previous client_operators header is removed) into client.hpp directly. The native and gRPC clients are also added. Some parts of the C++ API aren't added (e.g. some constructors for some classes and methods that return std::future.

I also reorganized the Python library to remove extra modules. The modules now follow C++ namespaces (so there's a module for util and pre_post but otherwise everything else is under the main module.

gbuildx commented 2 years ago

Build successful!