TensorFlow Serving C++ API Documentation
|
#include <manager.h>
Public Member Functions | |
virtual std::vector< ServableId > | ListAvailableServableIds () const =0 |
template<typename T > | |
std::map< ServableId, ServableHandle< T > > | GetAvailableServableHandles () const |
template<typename T > | |
Status | GetServableHandle (const ServableRequest &request, ServableHandle< T > *const handle) |
Friends | |
class | ManagerWrapper |
Manager is responsible for loading, unloading, lookup and lifetime management of all Servable objects via their Loaders.
std::map< ServableId, ServableHandle< T > > tensorflow::serving::Manager::GetAvailableServableHandles |
Returns a map of all the currently available servables of a particular type T. The map is from the servable's id to its corresponding handle.
IMPORTANT: The caller should not hold onto the handles for a long time, because holding them will delay servable loading and unloading.
Status tensorflow::serving::Manager::GetServableHandle | ( | const ServableRequest & | request, |
ServableHandle< T > *const | handle | ||
) |
Returns a ServableHandle given a ServableRequest. Returns error if no such Servable is available – e.g. not yet loaded, has been quiesced/unloaded, etc. Callers may assume that an OK status indicates a non-null handle.
IMPORTANT: The caller should not hold onto the handles for a long time, because holding them will delay servable loading and unloading.
|
pure virtual |
Gets a list of all available servable ids, i.e. each of these can be retrieved using GetServableHandle.
Implemented in tensorflow::serving::ServerCore, tensorflow::serving::ManagerWrapper, tensorflow::serving::CachingManager, tensorflow::serving::BasicManager, and tensorflow::serving::AspiredVersionsManager.