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

feat: support openclip&mclip models + refactor model loader #774

Merged
merged 45 commits into from
Jul 21, 2022

Conversation

shan-mx
Copy link
Contributor

@shan-mx shan-mx commented Jul 19, 2022

No description provided.

@codecov
Copy link

codecov bot commented Jul 19, 2022

Codecov Report

Merging #774 (4839d19) into main (2b78b12) will increase coverage by 4.52%.
The diff coverage is 86.76%.

@@            Coverage Diff             @@
##             main     #774      +/-   ##
==========================================
+ Coverage   82.09%   86.61%   +4.52%     
==========================================
  Files          17       21       +4     
  Lines        1240     1106     -134     
==========================================
- Hits         1018      958      -60     
+ Misses        222      148      -74     
Flag Coverage Δ
cas 86.61% <86.76%> (+4.52%) ⬆️

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

Impacted Files Coverage Δ
server/clip_server/executors/helper.py 97.05% <60.00%> (-2.95%) ⬇️
server/clip_server/model/mclip_model.py 83.33% <83.33%> (ø)
server/clip_server/model/clip_model.py 84.21% <84.21%> (ø)
server/clip_server/model/pretrained_models.py 85.71% <85.71%> (ø)
server/clip_server/model/tokenization.py 87.87% <87.87%> (ø)
server/clip_server/model/openclip_model.py 89.28% <89.28%> (ø)
server/clip_server/executors/clip_onnx.py 85.93% <100.00%> (+0.45%) ⬆️
server/clip_server/executors/clip_tensorrt.py 100.00% <100.00%> (ø)
server/clip_server/executors/clip_torch.py 87.93% <100.00%> (+0.89%) ⬆️
server/clip_server/model/clip.py 93.42% <100.00%> (+3.61%) ⬆️
... and 4 more

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 ca03dca...4839d19. Read the comment docs.

Copy link
Member

@numb3r3 numb3r3 left a comment

Choose a reason for hiding this comment

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

Bassically, the clip_model.py is good. However, I just feel the preprocessor.py is an over-kill. I want to simplify this part in a new branch, and merge into this PR later.

server/clip_server/executors/clip_torch.py Outdated Show resolved Hide resolved
server/clip_server/executors/clip_torch.py Outdated Show resolved Hide resolved
server/clip_server/executors/clip_torch.py Outdated Show resolved Hide resolved
server/clip_server/model/clip_model.py Outdated Show resolved Hide resolved
server/clip_server/model/mclip_model.py Outdated Show resolved Hide resolved
server/clip_server/model/mclip_model.py Outdated Show resolved Hide resolved
server/clip_server/model/mclip_model.py Show resolved Hide resolved
server/clip_server/model/mclip_model.py Outdated Show resolved Hide resolved
numb3r3 and others added 2 commits July 20, 2022 16:42
* fix: refactor preprocessor

* fix: error

* fix: missing functions
@github-actions github-actions bot added size/m and removed size/l labels Jul 20, 2022
@github-actions github-actions bot added size/xl and removed size/l labels Jul 20, 2022
@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@ZiniuYu
Copy link
Member

ZiniuYu commented Jul 21, 2022

86.61 wow new record

@numb3r3 numb3r3 merged commit fa62d8e into main Jul 21, 2022
@numb3r3 numb3r3 deleted the refactor-model-loader branch July 21, 2022 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants