(Latest Version)

Struct MultiTensorMessageInterfaceProxy

Derived Types

struct MultiTensorMessageInterfaceProxy

Interface proxy, used to insulate python bindings.

Subclassed by morpheus::MultiInferenceMessageInterfaceProxy, morpheus::MultiResponseMessageInterfaceProxy

Public Static Functions

static std::shared_ptr<MultiTensorMessage> 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)

Create and initialize a MultiTensorMessage, 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

Returns

std::shared_ptr<MultiTensorMessage>

static std::shared_ptr<TensorMemory> memory(MultiTensorMessage &self)

Returns a shared pointer of a tensor memory object.

Returns

std::shared_ptr<TensorMemory>

static TensorIndex offset(MultiTensorMessage &self)

Message offset in tensor memory object.

Parameters

self

Returns

TensorIndex

static TensorIndex count(MultiTensorMessage &self)

Messages count in tensor memory object.

Parameters

self

Returns

TensorIndex

static std::string id_tensor_name_getter(MultiTensorMessage &self)

Gets the id_tensor_name property.

Parameters

self

Returns

std::string Name of id_tensor_name

static void id_tensor_name_setter(MultiTensorMessage &self, std::string id_tensor_name)

Sets the id_tensor_name property.

Parameters
  • self

  • id_tensor_name – New name of id_tensor_name property

static pybind11::object get_tensor(MultiTensorMessage &self, const std::string &name)

Returns the tensor 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_id_tensor(MultiTensorMessage &self)

Get the tensor that holds message ID information. Equivalent to get_tensor(id_tensor_name)

Parameters

self

Returns

pybind11::object A cupy.ndarray object

static pybind11::object get_tensor_property(MultiTensorMessage &self, const std::string name)

Same as get_tensor but used when the method is being bound to a python property.

Parameters
  • self

  • name

Throws

pybind11::attribute_error – When no matching tensor exists.

Returns

pybind11::object

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