Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEA]: Replace the tensor copy in WriteToVectorDBStage with inserting AddScoresStage to the pipeline #1354

Open
2 tasks done
dagardner-nv opened this issue Nov 9, 2023 · 1 comment
Labels
feature request New feature or request

Comments

@dagardner-nv
Copy link
Contributor

Is this a new feature, an improvement, or a change to existing functionality?

Change

How would you describe the priority of this feature request

Low (would be nice)

Please provide a clear description of problem this feature solves

WriteToVectorDBStage has some logic in it, that if the incoming message is of type MultiResponseMessage it will copy the probs tensor into the dataframe in the embedding_column_name parameter.
https://github.com/nv-morpheus/Morpheus/blob/fea-sherlock/morpheus/stages/output/write_to_vector_db_stage.py#L135

This is also a bit tricky as the embedding_column_name parameter is only ever used when the incoming message type is a MultiResponseMessage instance and ignored otherwise, however this isn't reflected in the docstrigns.

Describe your ideal solution

The AddScoresStage should be used for this purpose instead as it contains a C++ impl, and ensures that the destination column will be pre-allocated.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I have searched the open feature requests and have found no duplicates for this feature request
@dagardner-nv dagardner-nv added the feature request New feature or request label Nov 9, 2023
@dagardner-nv dagardner-nv added this to the 23.11 - Sherlock milestone Nov 9, 2023
@mdemoret-nv mdemoret-nv removed this from the 23.11 - Sherlock milestone Dec 7, 2023
@dagardner-nv
Copy link
Contributor Author

This one is a bit trickier than at first glance, the AddScoresStage is tied to the config's classification labels, in addition to this, it copies each column in the probs tensor to a different column in the DF.

On the other hand the WriteToVectorDBStage is expecting the probs tensor to be copied into a single array column.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
Status: Todo
Development

No branches or pull requests

2 participants