TensorFlow Serving C++ API Documentation
Public Member Functions | List of all members
tensorflow::serving::PathPrefixLoaderFactory Class Reference

#include <caching_manager.h>

Inheritance diagram for tensorflow::serving::PathPrefixLoaderFactory:
Inheritance graph
[legend]
Collaboration diagram for tensorflow::serving::PathPrefixLoaderFactory:
Collaboration graph
[legend]

Public Member Functions

 PathPrefixLoaderFactory (const string &path_prefix, std::unique_ptr< StoragePathSourceAdapter > adapter)
 
ServableData< std::unique_ptr< Loader > > CreateLoader (const ServableId &id) override
 
int64_t GetServableVersion (const string &servable_name, ServableRequest::AutoVersionPolicy policy) const override
 

Detailed Description

A simple LoaderFactory that looks for a servable at a path formed by concatenating a fixed path prefix with the servable's name. It assumes that a given servable only has one version, namely version 0.

Definition at line 167 of file caching_manager.h.

Member Function Documentation

◆ CreateLoader()

ServableData< std::unique_ptr< Loader > > tensorflow::serving::PathPrefixLoaderFactory::CreateLoader ( const ServableId servable_id)
overridevirtual

Creates servable data consisting of the loader corresponding to the servable-id. Any errors can be reported by embedding them in the returned ServableData item.

Implements tensorflow::serving::CachingManager::LoaderFactory.

Definition at line 208 of file caching_manager.cc.

◆ GetServableVersion()

int64_t tensorflow::serving::PathPrefixLoaderFactory::GetServableVersion ( const string &  servable_name,
ServableRequest::AutoVersionPolicy  policy 
) const
overridevirtual

Returns a version corresponding to the servable name, for the given policy.

Implements tensorflow::serving::CachingManager::LoaderFactory.

Definition at line 220 of file caching_manager.cc.


The documentation for this class was generated from the following files: