Canary-ModelZoo #718
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Canary-ModelZoo | |
on: | |
schedule: | |
- cron: '0 9 * * *' | |
workflow_dispatch: | |
inputs: | |
engine: | |
description: 'model zoo (pytorch|tensorflow|mxnet|onnxruntime|huggingface|basic)' | |
required: false | |
default: 'all' | |
download: | |
description: 'Download the model artifacts' | |
required: false | |
default: 'false' | |
jobs: | |
canary-modelzoo: | |
if: github.repository == 'deepjavalibrary/djl-demo' | |
runs-on: ubuntu-latest | |
env: | |
DOWNLOAD: ${{github.event.inputs.download}} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: 17 | |
- name: Install libgomp | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgomp1 | |
- name: Test PyTorch model zoo | |
if: ${{github.event.inputs.download}} == 'pytorch' || ${{github.event.inputs.download}} == 'all' | |
working-directory: canary | |
run: DJL_ENGINE=pytorch-native-auto ./gradlew run -Dmain="ai.djl.canary.ModelZooTest" | |
- name: Test TensorFlow model zoo | |
if: ${{github.event.inputs.download}} == 'tensorflow' || ${{github.event.inputs.download}} == 'all' | |
working-directory: canary | |
run: DJL_ENGINE=tensorflow-native-auto ./gradlew run -Dmain="ai.djl.canary.ModelZooTest" | |
- name: Test MXNet model zoo | |
if: ${{github.event.inputs.download}} == 'mxnet' || ${{github.event.inputs.download}} == 'all' | |
working-directory: canary | |
run: DJL_ENGINE=mxnet-native-auto ./gradlew run -Dmain="ai.djl.canary.ModelZooTest" | |
- name: Test OnnxRuntime model zoo | |
if: ${{github.event.inputs.download}} == 'onnxruntime' || ${{github.event.inputs.download}} == 'all' | |
working-directory: canary | |
run: DJL_ENGINE=onnxruntime ./gradlew run -Dmain="ai.djl.canary.ModelZooTest" | |
- name: Test basic model zoo | |
if: ${{github.event.inputs.download}} == 'basic' || ${{github.event.inputs.download}} == 'all' | |
working-directory: canary | |
run: ./gradlew run -Dmain="ai.djl.canary.ModelZooTest" | |
- name: Test Huggingface tokenizers | |
if: ${{github.event.inputs.download}} == 'huggingface' || ${{github.event.inputs.download}} == 'all' | |
working-directory: canary | |
run: DJL_ENGINE=tokenizers ./gradlew run -Dmain="ai.djl.canary.ModelZooTest" |