Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Add text embedder #996

Merged

Conversation

abhijithneilabraham
Copy link
Contributor

@abhijithneilabraham abhijithneilabraham commented Nov 24, 2021

Fixes #760

@codecov
Copy link

codecov bot commented Nov 24, 2021

Codecov Report

Merging #996 (f69f207) into master (1ddd556) will increase coverage by 0.02%.
The diff coverage is 93.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #996      +/-   ##
==========================================
+ Coverage   86.71%   86.74%   +0.02%     
==========================================
  Files         266      269       +3     
  Lines       13809    13870      +61     
==========================================
+ Hits        11974    12031      +57     
- Misses       1835     1839       +4     
Flag Coverage Δ
unittests 86.74% <93.44%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
flash/text/embedding/model.py 92.00% <92.00%> (ø)
flash/core/utilities/imports.py 91.36% <100.00%> (+0.06%) ⬆️
flash/core/utilities/providers.py 100.00% <100.00%> (ø)
flash/text/__init__.py 100.00% <100.00%> (ø)
flash/text/embedding/__init__.py 100.00% <100.00%> (ø)
flash/text/embedding/backbones.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1ddd556...f69f207. Read the comment docs.

@ethanwharris ethanwharris changed the title St embeddings Sentence embedder Dec 8, 2021
Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work ! Almost there !

flash/text/embedding/model.py Show resolved Hide resolved
)

# 2. Load a previously trained SentenceEmbedder
model = SentenceEmbedder(backbone="sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding some tests to increase the coverage ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. On it now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tchaton I just commited a test but I am not sure if it is the right way you want it to be. Please do a review and let me know how I can improve.

Copy link
Collaborator

@ethanwharris ethanwharris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, looking good 😃 A few comments suggestions. Also, could you update CHANGELOG.md?

flash/text/embedding/model.py Outdated Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
tests/text/embedding/test_model.py Outdated Show resolved Hide resolved
@ethanwharris ethanwharris changed the title Sentence embedder Add text embedder Dec 9, 2021
Copy link
Collaborator

@ethanwharris ethanwharris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, LGTM 😃

@abhijithneilabraham
Copy link
Contributor Author

@tchaton

Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ! Awesome work !

@ethanwharris ethanwharris merged commit eb09e26 into Lightning-Universe:master Dec 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add TextEmbedder Task
3 participants