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

Refactor embedding logic for data points #2609

Merged
merged 3 commits into from
Jan 28, 2022
Merged

Conversation

alanakbik
Copy link
Collaborator

Refactoring of embedding logic for data points:

  • removes the global variable embedding_storage_mode
  • moves up set_embedding() and to() from the data point classes (Sentence, Token, etc.) to their parent DataPoint
  • allows dynamic embedding names to be passed to store_embeddings for small speed up
  • the set_embedding() method no longer transfers embeddings to flair.device (only when getting this is done now)
  • DocumentPoolEmbeddings class can now be instantiated only with a single embedding

@alanakbik alanakbik merged commit cbe683c into master Jan 28, 2022
@alanakbik alanakbik deleted the refactor_data_points branch January 28, 2022 13:19
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.

1 participant