morpheus.messages.memory.response_memory.ResponseMemoryAE
- class ResponseMemoryAE(*args, **kwargs)[source]
Bases:
morpheus.messages.memory.response_memory.ResponseMemory
Subclass of
ResponseMemory
specific to the AutoEncoder pipeline.- Parameters
- probscupy.ndarray
- user_idstr
- explain_dfpd.Dataframe
Probabilities tensor
User id the inference was performed against.
Explainability Dataframe, for each feature a column will exist with a name in the form of:
{feature}_z_loss
containing the loss z-score along withmax_abs_z
andmean_abs_z
columns- Attributes
- explain_df
- probs
- tensor_names
Methods
get_output
(name)Get the Tensor stored in the container identified by
name
.get_tensor
(name)Get the Tensor stored in the container identified by
name
.Get the tensors contained by this instance.
has_tensor
(name)Returns True if a tensor with the requested name exists in the tensors object
set_output
(name, tensor)Update the output tensor identified by
name
.set_tensor
(name, tensor)Update the tensor identified by
name
.set_tensors
(tensors)Overwrite the tensors stored by this instance.
- get_output(name)[source]
Get the Tensor stored in the container identified by
name
. Alias forResponseMemory.get_tensor
.- Parameters
- namestr
Key used to do lookup in tensors dict of message container.
- Returns
- cupy.ndarray
Tensors corresponding to name.
- Raises
- KeyError
If output name does not exist in message container.
- get_tensor(name)[source]
Get the Tensor stored in the container identified by
name
.- Parameters
- namestr
Tensor key name.
- Returns
- cupy.ndarray
Tensor.
- Raises
- KeyError
If tensor name does not exist in the container.
- get_tensors()[source]
Get the tensors contained by this instance. It is important to note that when C++ execution is enabled the returned tensors will be a Python copy of the tensors stored in the C++ object. As such any changes made to the tensors will need to be updated with a call to
set_tensors
.- Returns
- typing.Dict[str, cp.ndarray]
- has_tensor(name)[source]
Returns True if a tensor with the requested name exists in the tensors object
- Parameters
- namestr
Name to lookup
- Returns
- bool
True if the tensor was found
- set_output(name, tensor)[source]
Update the output tensor identified by
name
. Alias forResponseMemory.set_tensor
- Parameters
- namestr
- tensorcupy.ndarray
Key used to do lookup in tensors dict of the container.
Tensor as a CuPy array.
- Raises
- ValueError
If the number of rows in
tensor
does not matchcount
- set_tensor(name, tensor)[source]
Update the tensor identified by
name
.- Parameters
- namestr
- tensorcupy.ndarray
Tensor key name.
Tensor as a CuPy array.
- Raises
- ValueError
If the number of rows in
tensor
does not matchcount
- set_tensors(tensors)[source]
Overwrite the tensors stored by this instance. If the length of the tensors has changed, then the
count
property should also be updated.- Parameters
- tensorstyping.Dict[str, cupy.ndarray]
Collection of tensors uniquely identified by a name.