Skip to content

Commit

Permalink
manual trigger and fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
magdyksaleh committed Nov 8, 2024
1 parent a988acb commit 3650d38
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/integration_tests2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ on:
push:
branches: [ main, integration-tests-main]
workflow_dispatch:
inputs:
test_image_tag:
description: 'LoRAX Docker image tag to test (e.g. ghcr.io/predibase/lorax:test-123)'
required: false
type: string

jobs:
build-test-image:
if: github.event.inputs.test_image_tag == ''
runs-on: a100-40gb-runner
permissions:
contents: write
Expand Down Expand Up @@ -93,7 +99,8 @@ jobs:
run: echo "TEST_IMAGE_TAG=${{ steps.test_tag.outputs.test_tag }}" >> $GITHUB_ENV

run-tests:
needs: build-test-image
needs: [build-test-image]
if: always() && (github.event.inputs.test_image_tag != '' || needs.build-test-image.result == 'success')
runs-on: a100-40gb-runner

steps:
Expand All @@ -119,7 +126,11 @@ jobs:
- name: Set up environment variables
run: |
echo "HUGGING_FACE_HUB_TOKEN=${{ secrets.HUGGING_FACE_HUB_TOKEN }}" >> $GITHUB_ENV
echo "TEST_IMAGE_TAG=${{ needs.build-test-image.outputs.TEST_IMAGE_TAG }}" >> $GITHUB_ENV
if [ "${{ github.event.inputs.test_image_tag }}" != "" ]; then
echo "TEST_IMAGE_TAG=${{ github.event.inputs.test_image_tag }}" >> $GITHUB_ENV
else
echo "TEST_IMAGE_TAG=${{ needs.build-test-image.outputs.TEST_IMAGE_TAG }}" >> $GITHUB_ENV
fi
- name: Run Embedding tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion integration-tests-2/test_embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_stella_1_5b():
"docker_args": {"embedding_dim": 256},
}
with run_lorax_container(config):
response = requests.post("http://localhost:8080/embed", json={"inputs": ["Hello, world!"]})
response = requests.post("http://localhost:8080/embed", json={"inputs": "Hello, world!"})
response.raise_for_status()
print("RESPONSE FROM EMBEDDING: ", response.json())
assert len(response.json()["embeddings"]) > 0

0 comments on commit 3650d38

Please sign in to comment.