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

chore: move models to hugging face #944

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions .github/README-img/banner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions .github/README-img/pyclient-output.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .github/README-img/rerank-chart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions .github/README-img/server-output.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ coverage:
informational: true
target: auto # auto compares coverage to the previous base commit
comment:
layout: "reach, diff, flags, files"
layout: 'reach, diff, flags, files'
behavior: default
require_changes: false # if true: only post the comment if coverage changes
branches: # branch names that can post comment
- "main"
- 'main'
2 changes: 1 addition & 1 deletion .github/release-template.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

var all_titles = {};
var all_commiters = {};
var commitHref = "https://github.com/jina-ai/clip-as-service/commit/"
var commitHref = 'https://github.com/jina-ai/clip-as-service/commit/'

commits.forEach(function (commit) {

Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- id: set-matrix
run: |
sudo apt-get install jq
echo "::set-output name=matrix::$(bash scripts/get-all-test-paths.sh)"
echo '::set-output name=matrix::$(bash scripts/get-all-test-paths.sh)'
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}

Expand All @@ -40,23 +40,23 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install wheel
pip install --no-cache-dir "client/[test]"
pip install --no-cache-dir "server/[onnx]"
pip install --no-cache-dir "server/[transformers]"
pip install --no-cache-dir "server/[search]"
pip install --no-cache-dir "server/[cn_clip]"
pip install --no-cache-dir 'client/[test]'
pip install --no-cache-dir 'server/[onnx]'
pip install --no-cache-dir 'server/[transformers]'
pip install --no-cache-dir 'server/[search]'
pip install --no-cache-dir 'server/[cn_clip]'
- name: Test
id: test
run: |
pytest --suppress-no-test-exit-code --cov=clip_client --cov=clip_server --cov-report=xml \
-v -s -m "not gpu" ${{ matrix.test-path }}
echo "::set-output name=codecov_flag::cas"
-v -s -m 'not gpu' ${{ matrix.test-path }}
echo '::set-output name=codecov_flag::cas'
timeout-minutes: 30
- name: Check codecov file
id: check_files
uses: andstor/file-existence-action@v1
with:
files: "coverage.xml"
files: 'coverage.xml'
- name: Upload coverage from test to Codecov
uses: codecov/codecov-action@v2
if: steps.check_files.outputs.files_exists == 'true' && ${{ matrix.python-version }} == '3.7'
Expand Down Expand Up @@ -86,14 +86,14 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install wheel pytest pytest-cov nvidia-pyindex
pip install -e "client/[test]"
pip install -e "server/[tensorrt]"
pip install -e 'client/[test]'
pip install -e 'server/[tensorrt]'
- name: Test
id: test
run: |
pytest --suppress-no-test-exit-code --cov=clip_client --cov=clip_server --cov-report=xml \
-v -s -m "gpu" ./tests/test_tensorrt.py
echo "::set-output name=codecov_flag::cas"
-v -s -m 'gpu' ./tests/test_tensorrt.py
echo '::set-output name=codecov_flag::cas'
timeout-minutes: 30
env:
# fix re-initialized torch runtime error on cuda device
Expand All @@ -102,7 +102,7 @@ jobs:
id: check_files
uses: andstor/file-existence-action@v1
with:
files: "coverage.xml"
files: 'coverage.xml'
- name: Upload coverage from test to Codecov
uses: codecov/codecov-action@v3
if: steps.check_files.outputs.files_exists == 'true' && ${{ matrix.python-version }} == '3.7'
Expand Down Expand Up @@ -132,22 +132,22 @@ jobs:
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Manual Docker Build
inputs: '{ "release_token": "${{ env.release_token }}", "triggered_by": "CD"}'
inputs: '{ 'release_token': '${{ env.release_token }}', 'triggered_by': 'CD'}'
token: ${{ secrets.JINA_DEV_BOT }}
env:
release_token: ${{ secrets.CAS_RELEASE_TOKEN }}
- uses: benc-uk/workflow-dispatch@v1
with:
workflow: Manual CAS Docker Build
inputs: '{ "release_token": "${{ env.release_token }}", "triggered_by": "CD"}'
inputs: '{ 'release_token': '${{ env.release_token }}', 'triggered_by': 'CD'}'
token: ${{ secrets.JINA_DEV_BOT }}
env:
release_token: ${{ secrets.CAS_RELEASE_TOKEN }}
- name: Pre-release hub (.devN)
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Manual Hub Push
inputs: '{ "release_token": "${{ env.release_token }}", "triggered_by": "CD"}'
inputs: '{ 'release_token': '${{ env.release_token }}', 'triggered_by': 'CD'}'
token: ${{ secrets.JINA_DEV_BOT }}
env:
release_token: ${{ secrets.CAS_RELEASE_TOKEN }}
68 changes: 34 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-includes: "bad commit message"
comment-author: 'github-actions[bot]'
body-includes: 'bad commit message'
- name: Delete comment if exist
if: ${{ steps.fc.outputs.comment-id != 0 }}
uses: actions/github-script@v3
Expand All @@ -29,10 +29,10 @@ jobs:
- uses: actions/[email protected]
with:
fetch-depth: 0
- run: 'echo "module.exports = {extends: [''@commitlint/config-conventional'']}" > commitlint.config.js'
- run: 'echo 'module.exports = {extends: [''@commitlint/config-conventional'']}' > commitlint.config.js'
- uses: wagoid/commitlint-github-action@v4
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- name: if lint failed
if: ${{ failure() }}
uses: peter-evans/create-or-update-comment@v1
Expand All @@ -44,7 +44,7 @@ jobs:
- [Commit Message Guideline for the First Time Contributor](https://github.com/jina-ai/jina/issues/553)
- [Contributing Guideline](https://github.com/jina-ai/jina/blob/master/CONTRIBUTING.md)
This message will be deleted automatically when the commit messages get fixed.
reaction-type: "eyes"
reaction-type: 'eyes'

lint-flake-8:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
- id: set-matrix
run: |
sudo apt-get install jq
echo "::set-output name=matrix::$(bash scripts/get-all-test-paths.sh)"
echo '::set-output name=matrix::$(bash scripts/get-all-test-paths.sh)'
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}

Expand All @@ -109,23 +109,23 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install wheel pytest pytest-cov
pip install --no-cache-dir "client/[test]"
pip install --no-cache-dir "server/[onnx]"
pip install --no-cache-dir "server/[transformers]"
pip install --no-cache-dir "server/[search]"
pip install --no-cache-dir "server/[cn_clip]"
pip install --no-cache-dir 'client/[test]'
pip install --no-cache-dir 'server/[onnx]'
pip install --no-cache-dir 'server/[transformers]'
pip install --no-cache-dir 'server/[search]'
pip install --no-cache-dir 'server/[cn_clip]'
- name: Test
id: test
run: |
pytest --suppress-no-test-exit-code --cov=clip_client --cov=clip_server --cov-report=xml \
-v -s ${{ matrix.test-path }}
echo "::set-output name=codecov_flag::cas"
echo '::set-output name=codecov_flag::cas'
timeout-minutes: 30
- name: Check codecov file
id: check_files
uses: andstor/file-existence-action@v1
with:
files: "coverage.xml"
files: 'coverage.xml'
- name: Upload coverage from test to Codecov
uses: codecov/codecov-action@v3
if: steps.check_files.outputs.files_exists == 'true' && ${{ matrix.python-version }} == '3.7'
Expand Down Expand Up @@ -156,24 +156,24 @@ jobs:
run: |
python -m pip install pip==23.0.1
python -m pip install wheel pytest pytest-cov nvidia-pyindex
pip install -e "client/[test]"
pip install -e "server/[tensorrt]"
pip install -e "server/[onnx]"
pip install -e "server/[transformers]"
pip install -e 'client/[test]'
pip install -e 'server/[tensorrt]'
pip install -e 'server/[onnx]'
pip install -e 'server/[transformers]'
{
pip install -e "server/[flash-attn]"
pip install -e 'server/[flash-attn]'
} || {
echo "flash attention was not installed."
echo 'flash attention was not installed.'
}
pip install --no-cache-dir "server/[cn_clip]"
pip install --no-cache-dir 'server/[cn_clip]'
- name: Test
id: test
run: |
pytest --suppress-no-test-exit-code --cov=clip_client --cov=clip_server --cov-report=xml \
-v -s -m "gpu" ./tests/test_tensorrt.py
-v -s -m 'gpu' ./tests/test_tensorrt.py
pytest --suppress-no-test-exit-code --cov=clip_client --cov=clip_server --cov-report=xml \
-v -s -m "gpu" ./tests/test_simple.py
echo "::set-output name=codecov_flag::cas"
-v -s -m 'gpu' ./tests/test_simple.py
echo '::set-output name=codecov_flag::cas'
timeout-minutes: 30
env:
# fix re-initialized torch runtime error on cuda device
Expand All @@ -182,7 +182,7 @@ jobs:
id: check_files
uses: andstor/file-existence-action@v1
with:
files: "coverage.xml"
files: 'coverage.xml'
- name: Upload coverage from test to Codecov
uses: codecov/codecov-action@v3
if: steps.check_files.outputs.files_exists == 'true' && ${{ matrix.python-version }} == '3.7'
Expand Down Expand Up @@ -213,21 +213,21 @@ jobs:
run: |
python -m pip install pip==23.0.1
python -m pip install wheel pytest pytest-cov nvidia-pyindex
pip install -e "client/[test]"
pip install -e "server/[onnx]"
pip install -e "server/[transformers]"
pip install -e 'client/[test]'
pip install -e 'server/[onnx]'
pip install -e 'server/[transformers]'
{
pip install -e "server/[flash-attn]"
pip install -e 'server/[flash-attn]'
} || {
echo "flash attention was not installed."
echo 'flash attention was not installed.'
}
pip install --no-cache-dir "server/[cn_clip]"
pip install --no-cache-dir 'server/[cn_clip]'
- name: Test
id: test
run: |
pytest --suppress-no-test-exit-code --cov=clip_client --cov=clip_server --cov-report=xml \
-v -s -m "gpu" ./tests/test_model.py
echo "::set-output name=codecov_flag::cas"
-v -s -m 'gpu' ./tests/test_model.py
echo '::set-output name=codecov_flag::cas'
timeout-minutes: 30
env:
# fix re-initialized torch runtime error on cuda device
Expand All @@ -236,7 +236,7 @@ jobs:
id: check_files
uses: andstor/file-existence-action@v1
with:
files: "coverage.xml"
files: 'coverage.xml'
- name: Upload coverage from test to Codecov
uses: codecov/codecov-action@v3
if: steps.check_files.outputs.files_exists == 'true' && ${{ matrix.python-version }} == '3.7'
Expand All @@ -259,4 +259,4 @@ jobs:
run: exit 1
- name: Success
if: ${{ success() }}
run: echo "All Done"
run: echo 'All Done'
Loading
Loading