ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
FlavorTagInference
FlavorTagInference
SaltModelTriton.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef FLAVORTAGINFERENCE_SALTMODELTRITON_H
6
#define FLAVORTAGINFERENCE_SALTMODELTRITON_H
7
14
15
#include "
FlavorTagInference/ISaltModel.h
"
16
17
#include "grpc_client.h"
18
#include "grpc_service.pb.h"
19
20
namespace
Ort
{
21
class
Session;
22
}
23
24
namespace
tc
= triton::client;
25
26
namespace
FlavorTagInference
{
27
28
class
SaltModelTriton
final :
public
ISaltModel
29
{
30
public
:
31
SaltModelTriton
(
const
std::string& path_to_onnx
32
,
const
std::string& model_name
33
,
float
client_timeout
34
,
int
port
35
,
const
std::string& url
36
,
bool
useSSL
37
,
const
std::string& bearer =
""
);
38
39
virtual
InferenceOutput
runInference
(
InputMap
& gnn_inputs)
const override
;
40
41
virtual
const
SaltModelGraphConfig::GraphConfig
getGraphConfig
()
const override
;
42
virtual
const
OutputConfig
&
getOutputConfig
()
const override
;
43
virtual
SaltModelVersion
getSaltModelVersion
()
const override
;
44
virtual
const
std::string&
getModelName
()
const override
;
45
46
private
:
47
const
nlohmann::json
loadMetadata
(
const
std::string& key,
const
Ort::Session* session)
const
;
48
const
std::string
determineModelType
(
const
Ort::Session* session)
const
;
49
tc::InferenceServerGrpcClient*
getClient
()
const
;
50
51
nlohmann::json
m_metadata
;
52
53
size_t
m_num_outputs
;
54
std::string
m_model_name
;
55
std::string
m_model_type
;
56
OutputConfig
m_output_nodes
;
57
58
SaltModelVersion
m_onnx_model_version
=
SaltModelVersion::UNKNOWN
;
59
60
std::unique_ptr<tc::InferOptions>
m_options
;
61
float
m_clientTimeout
{0.f};
62
int
m_port
{8001};
63
std::string
m_url
{};
64
bool
m_useSSL
{
false
};
65
std::string
m_bearer
{};
66
};
// Class SaltModelnTriton
67
}
// end of FlavorTagInference namespace
68
69
#endif
70
ISaltModel.h
tc
static Double_t tc
Definition
LArPhysWaveHECTool.cxx:38
FlavorTagInference::ISaltModel
Definition
ISaltModel.h:47
FlavorTagInference::SaltModelTriton::m_clientTimeout
float m_clientTimeout
Definition
SaltModelTriton.h:61
FlavorTagInference::SaltModelTriton::m_model_name
std::string m_model_name
Definition
SaltModelTriton.h:54
FlavorTagInference::SaltModelTriton::m_num_outputs
size_t m_num_outputs
Definition
SaltModelTriton.h:53
FlavorTagInference::SaltModelTriton::m_metadata
nlohmann::json m_metadata
Definition
SaltModelTriton.h:51
FlavorTagInference::SaltModelTriton::getClient
tc::InferenceServerGrpcClient * getClient() const
Definition
SaltModelTriton.cxx:301
FlavorTagInference::SaltModelTriton::m_url
std::string m_url
Definition
SaltModelTriton.h:63
FlavorTagInference::SaltModelTriton::m_bearer
std::string m_bearer
Definition
SaltModelTriton.h:65
FlavorTagInference::SaltModelTriton::m_useSSL
bool m_useSSL
Definition
SaltModelTriton.h:64
FlavorTagInference::SaltModelTriton::m_output_nodes
OutputConfig m_output_nodes
Definition
SaltModelTriton.h:56
FlavorTagInference::SaltModelTriton::loadMetadata
const nlohmann::json loadMetadata(const std::string &key, const Ort::Session *session) const
Definition
SaltModelTriton.cxx:161
FlavorTagInference::SaltModelTriton::getOutputConfig
virtual const OutputConfig & getOutputConfig() const override
Definition
SaltModelTriton.cxx:200
FlavorTagInference::SaltModelTriton::getGraphConfig
virtual const SaltModelGraphConfig::GraphConfig getGraphConfig() const override
Definition
SaltModelTriton.cxx:196
FlavorTagInference::SaltModelTriton::m_port
int m_port
Definition
SaltModelTriton.h:62
FlavorTagInference::SaltModelTriton::m_onnx_model_version
SaltModelVersion m_onnx_model_version
Definition
SaltModelTriton.h:58
FlavorTagInference::SaltModelTriton::m_model_type
std::string m_model_type
Definition
SaltModelTriton.h:55
FlavorTagInference::SaltModelTriton::runInference
virtual InferenceOutput runInference(InputMap &gnn_inputs) const override
Definition
SaltModelTriton.cxx:213
FlavorTagInference::SaltModelTriton::m_options
std::unique_ptr< tc::InferOptions > m_options
Definition
SaltModelTriton.h:60
FlavorTagInference::SaltModelTriton::determineModelType
const std::string determineModelType(const Ort::Session *session) const
Definition
SaltModelTriton.cxx:168
FlavorTagInference::SaltModelTriton::getSaltModelVersion
virtual SaltModelVersion getSaltModelVersion() const override
Definition
SaltModelTriton.cxx:204
FlavorTagInference::SaltModelTriton::SaltModelTriton
SaltModelTriton(const std::string &path_to_onnx, const std::string &model_name, float client_timeout, int port, const std::string &url, bool useSSL, const std::string &bearer="")
Definition
SaltModelTriton.cxx:79
FlavorTagInference::SaltModelTriton::getModelName
virtual const std::string & getModelName() const override
Definition
SaltModelTriton.cxx:208
FlavorTagInference
This file contains "getter" functions used for accessing tagger inputs from the EDM.
Definition
CaloClusterLoader.h:27
FlavorTagInference::OutputConfig
std::vector< SaltModelOutput > OutputConfig
Definition
ISaltModel.h:38
FlavorTagInference::SaltModelVersion
SaltModelVersion
Definition
ISaltModel.h:26
FlavorTagInference::SaltModelVersion::UNKNOWN
@ UNKNOWN
Definition
ISaltModel.h:26
FlavorTagInference::InputMap
std::map< std::string, Inputs, std::less<> > InputMap
Definition
ISaltModel.h:37
Ort
Definition
OnnxNNCollection.h:14
FlavorTagInference::InferenceOutput
Definition
ISaltModel.h:40
FlavorTagInference::SaltModelGraphConfig::GraphConfig
Definition
SaltModelGraphConfig.h:36
Generated on
for ATLAS Offline Software by
1.17.0