Skip to content

Commit

Permalink
updating readme [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ersilia-bot committed Dec 23, 2024
1 parent f13de84 commit 9f2d91a
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-model-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
echo "Sample model id selected: $MODEL_ID"
ersilia -v fetch $MODEL_ID --from_dir .
ersilia -v serve $MODEL_ID
ersilia example inputs -n 5 -f input.csv --predefined
ersilia example -n 5 -f input.csv --predefined
ersilia -v api -i input.csv
ersilia close
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
run: |
source activate
ersilia -v serve $MODEL_ID
ersilia example inputs -n 5 -f input.csv --predefined
ersilia example -n 5 -f input.csv --predefined
ersilia -v run -i "input.csv" -o "output.csv"
ersilia close
cat output.csv
Expand Down
40 changes: 37 additions & 3 deletions .github/workflows/upload-bentoml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
# We cannot tag it as anything other than latest because
# ersilia cli only looks for the 'latest' tag
- name: Build only AMD64 Image for Testing
- name: Build only AMD64 Image for Testing
id: buildForTest
uses: docker/build-push-action@v5
with:
Expand All @@ -103,7 +103,7 @@ jobs:
run: |
ersilia -v fetch ${{ github.event.repository.name }} --from_dockerhub
ersilia -v serve ${{ github.event.repository.name }} --track #Added --track here
ersilia example inputs -n 1 -f input.csv --predefined
ersilia example -n 1 -f input.csv --predefined
ersilia -v run -i "input.csv" -o "output.csv"
ersilia close
output=$(python .github/scripts/verify_model_outcome.py output.csv)
Expand All @@ -113,16 +113,50 @@ jobs:
fi
rm output.csv
# If test failed, we tag the image as dev
- name: Tag Dev image
id: tagDevImage
if: steps.testBuiltImage.outcome == 'failure'
run: |
docker tag ersiliaos/${{ github.event.repository.name }}:latest ersiliaos/${{ github.event.repository.name }}:dev
docker push ersiliaos/${{ github.event.repository.name }}:dev
- name: Create a Test issue
if: steps.testBuiltImage.outcome == 'failure'
uses: actions-ecosystem/action-create-issue@b63bc2bbacb6a838dfe4a9f70da6665ae0962a49
id: createFailureIssue
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
title: Failed model build
body: |
The model build failed. Please check the logs and fix the issue.
A dev image has been pushed to DockerHub for reference.
labels: |
bug
# If test succeeds we tag the image with timestamp and latest
- name: Get date
id: getDate
env:
DATE: ${{ github.run_started_at }}
run: |
# Keep only the date part
DATE=$(echo $DATE | cut -d 'T' -f 1)
echo "::set-output name=DATE::$DATE"
- name: Build and push
id: buildMultiple
if: steps.testBuiltImage.outcome == 'success'
continue-on-error: true
uses: docker/build-push-action@v6.7.0
timeout-minutes: 45
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ersiliaos/${{ github.event.repository.name }}:latest
tags: |
ersiliaos/${{ github.event.repository.name }}:latest
ersiliaos/${{ github.event.repository.name }}:${{ steps.getDate.outputs.DATE }}
- name: Set build failure output
id: buildCheck
Expand Down
40 changes: 37 additions & 3 deletions .github/workflows/upload-ersilia-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
run: |
ersilia -v fetch ${{ github.event.repository.name }} --from_dockerhub
ersilia -v serve ${{ github.event.repository.name }} --track #Added --track here
ersilia example inputs -n 1 -f input.csv --predefined
ersilia example -n 1 -f input.csv --predefined
ersilia -v run -i "input.csv" -o "output.csv"
ersilia close
output=$(python .github/scripts/verify_model_outcome.py output.csv)
Expand All @@ -93,16 +93,50 @@ jobs:
fi
rm output.csv
# If test failed, we tag the image as dev
- name: Tag Dev image
id: tagDevImage
if: steps.testBuiltImageErsiliaPack.outcome == 'failure'
run: |
docker tag ersiliaos/${{ github.event.repository.name }}:latest ersiliaos/${{ github.event.repository.name }}:dev
docker push ersiliaos/${{ github.event.repository.name }}:dev
- name: Create a Test issue
if: steps.testBuiltImageErsiliaPack.outcome == 'failure'
uses: actions-ecosystem/action-create-issue@b63bc2bbacb6a838dfe4a9f70da6665ae0962a49
id: createFailureIssue
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
title: Failed model build
body: |
The model build failed. Please check the logs and fix the issue.
A dev image has been pushed to DockerHub for reference.
labels: |
bug
# If test succeeds we tag the image with timestamp and latest
- name: Get date
id: getDate
env:
DATE: ${{ github.run_started_at }}
run: |
# Keep only the date part
DATE=$(echo $DATE | cut -d 'T' -f 1)
echo "::set-output name=DATE::$DATE"
- name: Build and push
id: buildMultiple
if: steps.testBuiltImageErsiliaPack.outcome == 'success'
continue-on-error: true
uses: docker/build-push-action@v6.7.0
timeout-minutes: 45
with:
context: ../
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ersiliaos/${{ github.event.repository.name }}:latest
tags: |
ersiliaos/${{ github.event.repository.name }}:latest
ersiliaos/${{ github.event.repository.name }}:${{ steps.getDate.outputs.DATE }}
- name: Set build failure output
id: buildCheck
Expand Down

0 comments on commit 9f2d91a

Please sign in to comment.