Skip to content

Remove hardcoded version in Assertion error #1462

Remove hardcoded version in Assertion error

Remove hardcoded version in Assertion error #1462

Workflow file for this run

name: DJLServing client tests
on:
pull_request:
paths-ignore:
- "**.md"
- "**.ipynb"
- "**.json"
- "**.html"
- "**.js"
- "**.css"
workflow_dispatch:
jobs:
client_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: 11
- name: Set up Python3
uses: actions/setup-python@v4
with:
python-version: '3.x'
# Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
- uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Install DJLServing dependencies
run: |
cd serving && ./gradlew createDeb
sudo dpkg -i build/distributions/*.deb
cd ../engines/python/setup
pip install -e ".[test]"
- name: Run Java binary mode tests
run: |
cd tests/binary && python prepare.py pt && cd ..
djl-serving -m test::PyTorch=file://$PWD/binary/model.pt &> output.log &
sleep 30
cd java-client
./gradlew build
cd ../binary && python prepare.py pt --clean && cd ..
jobs
kill %1
- name: Run Python binary mode tests
run: |
cd tests/binary && python prepare.py pt && cd ..
djl-serving -m test::PyTorch=file://$PWD/binary/model.pt &> output.log &
sleep 30
python test_binary.py 1,3,224,224 1,1000
cd binary && python prepare.py pt --clean && cd ..
jobs
kill %1
- name: Run Python mode tests
run: |
cd tests
djl-serving -m test::Python=file://$PWD/python &> output.log &
sleep 15
python test_client.py
jobs
kill %1
- name: On failure step
if: ${{ failure() }}
run: |
cat tests/output.log
client_test_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: 11
- name: Set up Python3
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install DJLServing dependencies
shell: bash
run: |
cd engines/python/setup
pip install -e ".[test]"
cd ../../../serving
./gradlew jar
- name: Run Java binary mode tests
shell: bash
run: |
cd tests/binary && python prepare.py pt && cd ../../
./gradlew :serving:run --args="-m test::PyTorch=file:$(pwd -W)/tests/binary/model.pt" > output.log &
sleep 30
cd tests/java-client
./gradlew build
- name: Run Python binary mode tests
shell: bash
run: |
cd tests/ && python test_binary.py 1,3,224,224 1,1000
cd binary && python prepare.py pt --clean && cd ..
- name: Run Python mode tests
shell: bash
run: |
./gradlew --stop
./gradlew :serving:run --args="-m test::Python=file:$(pwd -W)/tests/python" &> output.log &
sleep 30
cd tests/ && python test_client.py
- name: On failure step
if: ${{ failure() }}
shell: bash
run: |
cat output.log