Struct MultiResponseMessageInterfaceProxy

(Latest Version)

Base Type

Derived Type

struct MultiResponseMessageInterfaceProxy : public morpheus::MultiTensorMessageInterfaceProxy

Interface proxy, used to insulate python bindings.

Subclassed by morpheus::MultiResponseProbsMessageInterfaceProxy

Public Static Functions

static std::shared_ptr<MultiResponseMessage> init(std::shared_ptr<MessageMeta> meta, TensorIndex mess_offset, TensorIndex mess_count, std::shared_ptr<TensorMemory> memory, TensorIndex offset, TensorIndex count, std::string id_tensor_name, std::string probs_tensor_name)

Create and initialize a MultiResponseMessage, and return a shared pointer to the result.

Parameters
  • meta – Holds a data table, in practice a cudf DataFrame, with the ability to return both Python and C++ representations of the table

  • mess_offset – Offset into the metadata batch

  • mess_count – Messages count

  • memory – Shared pointer of a tensor memory

  • offset – Message offset in inference memory instance

  • count – Message count in inference memory instance

  • id_tensor_name – Name of the tensor that correlates tensor rows to message IDs

  • probs_tensor_name – Name of the tensor that holds output probabilities

Returns

std::shared_ptr<MultiResponseMessage>

static std::string probs_tensor_name_getter(MultiResponseMessage &self)

Gets the probs_tensor_name property.

Parameters

self

Returns

std::string Name of probs_tensor_name

static void probs_tensor_name_setter(MultiResponseMessage &self, std::string probs_tensor_name)

Sets the probs_tensor_name property.

Parameters
  • self

  • probs_tensor_name – New name of probs_tensor_name property

static pybind11::object get_output(MultiResponseMessage &self, const std::string &name)

Returns the output tensor for a given name.

Parameters
  • self

  • name – : Tensor name

Throws

pybind11::key_error – When no matching tensor exists.

Returns

pybind11::object

static pybind11::object get_probs_tensor(MultiResponseMessage &self)

Get the tensor that holds output probabilities. Equivalent to get_tensor(probs_tensor_name)

Parameters

self

Returns

pybind11::object A cupy.ndarray object

© Copyright 2023, NVIDIA. Last updated on Apr 11, 2023.