Skip to content

Conversation

nhansendev
Copy link

Added "embeddings" kwarg to update_topics for use when pre-calculated document embeddings are used. Addresses issue #2316

What does this PR do?

Fixes #2316

Before submitting

  • This PR fixes a typo or improves the docs (if yes, ignore all other checks!).
  • Did you read the contributor guideline?
  • Was this discussed/approved via a Github issue? Please add a link to it if that's the case.
  • Did you make sure to update the documentation with your changes (if applicable)?
  • Did you write any new necessary tests?

Added "embeddings" kwarg to update_topics for use when pre-calculated document embeddings are used. Addresses issue MaartenGr#2316
@nhansendev
Copy link
Author

nhansendev commented Mar 25, 2025

The user could easily miss that they need to provide the embeddings to update_topics. Should there be some sort of warning? Maybe a check for whether "embeddings" and "self.embedding_model" are both None?

@MaartenGr
Copy link
Owner

Might indeed be nice to have such a check here but I'm not sure whether it would cover all cases considering the _create_topic_vectors also has a few different options for creating topic vectors.

@MaartenGr
Copy link
Owner

I'm rerunning all jobs since the error didn't relate to your code but a connection issue with huggingface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't get updated topic_embeddings_ when using pre-calculated document embeddings?

2 participants