1 #ifndef HeterogeneousCore_SonicTriton_TritonService
2 #define HeterogeneousCore_SonicTriton_TritonService
8 #include <unordered_set>
9 #include <unordered_map>
14 #include "grpc_client.h"
20 class PathsAndConsumesOfModulesBase;
22 class ModuleDescription;
32 :
enable(pset.getUntrackedParameter<bool>(
"enable")),
33 debug(pset.getUntrackedParameter<bool>(
"debug")),
34 verbose(pset.getUntrackedParameter<bool>(
"verbose")),
35 useDocker(pset.getUntrackedParameter<bool>(
"useDocker")),
36 useGPU(pset.getUntrackedParameter<bool>(
"useGPU")),
37 retries(pset.getUntrackedParameter<int>(
"retries")),
38 wait(pset.getUntrackedParameter<int>(
"wait")),
64 :
url(pset.getUntrackedParameter<std::
string>(
"address") +
":" +
65 std::to_string(pset.getUntrackedParameter<unsigned>(
"port"))),
67 useSsl(pset.getUntrackedParameter<bool>(
"useSsl")),
84 std::unordered_set<std::string>
models;
129 std::unordered_map<std::string, Model>
models_;
T getUntrackedParameter(std::string const &, T const &) const
std::unordered_map< std::string, Model > models_
std::unordered_set< unsigned > modules
Server serverInfo(const std::string &model, const std::string &preferred="") const
std::unordered_map< std::string, Model > unservedModels_
void postModuleConstruction(edm::ModuleDescription const &)
Server(const std::string &name_, const std::string &url_, TritonServerType type_)
unsigned currentModuleId_
Model(const std::string &path_="")
triton::client::SslOptions sslOptions
std::unordered_set< std::string > servers
TritonService(const edm::ParameterSet &pset, edm::ActivityRegistry &areg)
static const std::string fallbackAddress
Module(const std::string &model_)
void addModel(const std::string &modelName, const std::string &path)
Server(const edm::ParameterSet &pset)
FallbackOpts fallbackOpts_
std::unordered_set< std::string > models
FallbackOpts(const edm::ParameterSet &pset)
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
void preModuleConstruction(edm::ModuleDescription const &)
std::string createGlobalIdentifier(bool binary=false)
void preModuleDestruction(edm::ModuleDescription const &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::unordered_map< unsigned, Module > modules_
const std::string & pid() const
std::unordered_map< std::string, Server > servers_
static const std::string fallbackName