From 1d9ecaec10e6ed9e0915b7060960399cdc4bed1c Mon Sep 17 00:00:00 2001 From: Yue Fei <59813791+moria97@users.noreply.github.com> Date: Wed, 5 Jun 2024 17:50:48 +0800 Subject: [PATCH] Remove useless embedding model (#50) * Remove entrypoint * Update ui * Revert dockerfile change * Delete debug clauses * Fix embed dim value * Update view model * Fix test issue --- .github/workflows/docker.yml | 17 ++++++++++++++--- src/pai_rag/app/web/tabs/settings_tab.py | 1 + src/pai_rag/app/web/ui_constants.py | 1 - 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a51026c9..d3c95cbb 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -9,6 +9,7 @@ on: # Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. env: REGISTRY: registry.cn-beijing.aliyuncs.com + REGISTRY_HZ: registry.cn-hangzhou.aliyuncs.com # There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. jobs: @@ -18,15 +19,25 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 # Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. - - uses: aliyun/acr-login@v1 + - name: Login to ACR Beijing region + uses: aliyun/acr-login@v1 with: login-server: "https://${{ env.REGISTRY }}" username: ${{ secrets.ACR_USER }} password: ${{ secrets.ACR_PASSWORD }} + - name: Login to ACR Hangzhou region + - uses: aliyun/acr-login@v1 + with: + login-server: "https://${{ env.REGISTRY_HZ }}" + username: ${{ secrets.ACR_USER }} + password: ${{ secrets.ACR_PASSWORD }} + - name: Build and push image env: IMAGE_TAG: pairag_0.0.1 run: | - docker build -t ${{ env.REGISTRY }}/mybigpai/aigc_apps:$IMAGE_TAG . - docker push ${{ env.REGISTRY }}/mybigpai/aigc_apps:$IMAGE_TAG + docker build -t ${{ env.REGISTRY }}/mybigpai/pairag:$IMAGE_TAG . + docker tag ${{ env.REGISTRY }}/mybigpai/pairag:$IMAGE_TAG ${{ env.REGISTRY_HZ }}/mybigpai/pairag:$IMAGE_TAG + docker push ${{ env.REGISTRY }}/mybigpai/pairag:$IMAGE_TAG + docker push ${{ env.REGISTRY_HZ }}/mybigpai/pairag:$IMAGE_TAG diff --git a/src/pai_rag/app/web/tabs/settings_tab.py b/src/pai_rag/app/web/tabs/settings_tab.py index f7614903..e058944e 100644 --- a/src/pai_rag/app/web/tabs/settings_tab.py +++ b/src/pai_rag/app/web/tabs/settings_tab.py @@ -102,6 +102,7 @@ def change_emb_model(model): llm_eas_token = gr.Textbox( label="EAS Token", elem_id="llm_eas_token", + type="password", ) llm_eas_model_name = gr.Textbox( label="EAS Model name", diff --git a/src/pai_rag/app/web/ui_constants.py b/src/pai_rag/app/web/ui_constants.py index 69946f6e..872e2256 100644 --- a/src/pai_rag/app/web/ui_constants.py +++ b/src/pai_rag/app/web/ui_constants.py @@ -32,7 +32,6 @@ "bge-small-zh-v1.5": 1024, "SGPT-125M-weightedmean-nli-bitfit": 768, "text2vec-large-chinese": 1024, - "text2vec-base-chinese": 768, "paraphrase-multilingual-MiniLM-L12-v2": 384, }