tensorflow::serving::PathPrefixLoaderFactory

#include <caching_manager.h>

A simple LoaderFactory that looks for a servable at a path formed by concatenating a fixed path prefix with the servable's name.

Summary

It assumes that a given servable only has one version, namely version 0.

Inheritance

Inherits from: tensorflow::serving::CachingManager::LoaderFactory

Constructors and Destructors

PathPrefixLoaderFactory(const string & path_prefix, std::unique_ptr< StoragePathSourceAdapter > adapter)
~PathPrefixLoaderFactory()

Public functions

CreateLoader(const ServableId & servable_id) override
virtual ServableData< std::unique_ptr< Loader > >
Creates servable data consisting of the loader corresponding to the servable-id.
GetLatestVersion(const string & servable_name) const override
virtual int64
Returns the latest version corresponding to the servable name.

Public functions

CreateLoader

virtual ServableData< std::unique_ptr< Loader > > CreateLoader(
  const ServableId & servable_id
) override

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.

GetLatestVersion

virtual int64 GetLatestVersion(
  const string & servable_name
) const override

Returns the latest version corresponding to the servable name.

PathPrefixLoaderFactory

 PathPrefixLoaderFactory(
  const string & path_prefix,
  std::unique_ptr< StoragePathSourceAdapter > adapter
)

~PathPrefixLoaderFactory

 ~PathPrefixLoaderFactory() override=default