Skip to content

Commit

Permalink
Merge pull request #61 from weaviate/support-biu-nlp-abstract-sim-model
Browse files Browse the repository at this point in the history
Add support for Bar-Ilan University NLP Lab models
  • Loading branch information
antas-marcin authored May 29, 2023
2 parents ffe4aba + 02dae4f commit 47cac3d
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 13 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ jobs:
model_tag_name: google-flan-t5-base
- model_name: google/flan-t5-large
model_tag_name: google-flan-t5-large
- model_name: biu-nlp/abstract-sim-sentence
model_tag_name: biu-nlp-abstract-sim-sentence
- model_name: biu-nlp/abstract-sim-query
model_tag_name: biu-nlp-abstract-sim-query
env:
LOCAL_REPO: transformers-inference
REMOTE_REPO: semitechnologies/transformers-inference
Expand All @@ -73,16 +77,16 @@ jobs:
password: ${{secrets.DOCKER_PASSWORD}}
- name: Build and test
run: |
cicd/build.sh || exit 1
cicd/test.sh || exit 1
cicd/build.sh
cicd/test.sh
- name: Deploy
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
run: |
export GIT_TAG=${GITHUB_REF##*/}
cicd/docker_push.sh || exit 1
cicd/docker_push.sh
build-custom-image:
name: Build custom image
runs-on: ubuntu-latest
Expand All @@ -107,4 +111,4 @@ jobs:
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
run: |
export GIT_TAG=${GITHUB_REF##*/}
cicd/build_custom_base.sh || exit 1
cicd/build_custom_base.sh
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
__pycache__
models
nltk_data
.venv/
.vscode/
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ The pre-built models include:
|`facebook/dpr-question_encoder-single-nq-base` ([Info](https://huggingface.co/facebook/dpr-question_encoder-single-nq-base))|`semitechnologies/transformers-inference:facebook-dpr-question_encoder-single-nq-base`|
|`vblagoje/dpr-ctx_encoder-single-lfqa-wiki` ([Info](https://huggingface.co/vblagoje/dpr-ctx_encoder-single-lfqa-wiki))|`semitechnologies/transformers-inference:vblagoje-dpr-ctx_encoder-single-lfqa-wiki`|
|`vblagoje/dpr-question_encoder-single-lfqa-wiki` ([Info](https://huggingface.co/vblagoje/dpr-question_encoder-single-lfqa-wiki))|`semitechnologies/transformers-inference:vblagoje-dpr-question_encoder-single-lfqa-wiki`|
|Bar-Ilan University NLP Lab Models|
|`biu-nlp/abstract-sim-sentence` ([Info](https://huggingface.co/biu-nlp/abstract-sim-sentence))|`semitechnologies/transformers-inference:biu-nlp-abstract-sim-sentence`|
|`biu-nlp/abstract-sim-query` ([Info](https://huggingface.co/biu-nlp/abstract-sim-query))|`semitechnologies/transformers-inference:biu-nlp-abstract-sim-query`|


The above image names always point to the latest version of the inference
Expand Down
2 changes: 1 addition & 1 deletion cicd/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

set -e
set -eou pipefail

local_repo=${LOCAL_REPO?Variable LOCAL_REPO is required}
model_name=${MODEL_NAME?Variable MODEL_NAME is required}
Expand Down
2 changes: 1 addition & 1 deletion cicd/build_custom_base.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

set -e
set -eou pipefail

function build() {
docker build -f custom.Dockerfile -t "custom-base" .
Expand Down
2 changes: 1 addition & 1 deletion cicd/docker_push.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

set -e pipefail
set -eou pipefail

# Docker push rules
# If not on main
Expand Down
2 changes: 1 addition & 1 deletion cicd/test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

set -e
set -eou pipefail

local_repo=${LOCAL_REPO?Variable LOCAL_REPO is required}

Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
transformers==4.27.2
fastapi==0.95.0
uvicorn==0.21.1
transformers==4.29.2
fastapi==0.95.2
uvicorn==0.22.0
nltk==3.8.1
torch==2.0.0
sentencepiece==0.1.97
torch==2.0.1
sentencepiece==0.1.99

0 comments on commit 47cac3d

Please sign in to comment.