CMS 3D CMS Logo

Typedefs | Functions
triton_utils Namespace Reference

Typedefs

using Error = nvidia::inferenceserver::client::Error
 

Functions

template<typename C >
std::string printColl (const C &coll, const std::string &delim=", ")
 
void throwIfError (const Error &err, std::string_view msg)
 
bool warnIfError (const Error &err, std::string_view msg)
 

Typedef Documentation

◆ Error

using triton_utils::Error = typedef nvidia::inferenceserver::client::Error

Definition at line 15 of file triton_utils.h.

Function Documentation

◆ printColl()

template<typename C >
std::string triton_utils::printColl ( const C &  coll,
const std::string &  delim = ", " 
)

Definition at line 11 of file triton_utils.cc.

11  {
12  if (coll.empty())
13  return "";
14  std::stringstream msg;
15  //avoid trailing delim
16  std::copy(std::begin(coll), std::end(coll), std::experimental::make_ostream_joiner(msg, delim));
17  return msg.str();
18  }

References filterCSVwithJSON::copy, mps_fire::end, and mps_check::msg.

Referenced by TritonClient::TritonClient().

◆ throwIfError()

void triton_utils::throwIfError ( const Error err,
std::string_view  msg 
)

Definition at line 20 of file triton_utils.cc.

20  {
21  if (!err.IsOk())
22  throw cms::Exception("TritonServerFailure") << msg << ": " << err;
23  }

References submitPVResolutionJobs::err, and mps_check::msg.

Referenced by TritonData< IO >::fromServer(), TritonData< IO >::toServer(), and TritonClient::TritonClient().

◆ warnIfError()

bool triton_utils::warnIfError ( const Error err,
std::string_view  msg 
)

Definition at line 25 of file triton_utils.cc.

25  {
26  if (!err.IsOk())
27  edm::LogWarning("TritonServerWarning") << msg << ": " << err;
28  return err.IsOk();
29  }

References submitPVResolutionJobs::err, and mps_check::msg.

Referenced by TritonClient::evaluate(), TritonClient::getResults(), and TritonClient::getServerSideStatus().

filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
mps_check.msg
tuple msg
Definition: mps_check.py:285
mps_fire.end
end
Definition: mps_fire.py:242
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
cms::Exception
Definition: Exception.h:70
edm::Log
Definition: MessageLogger.h:70