Skip to content

Added check for predictions file #208

Added check for predictions file

Added check for predictions file #208

Workflow file for this run

name: Test
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: false
swap-storage: true
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Determine Dockerfile
id: dockerfile
run: cat settings.json | jq -r .dockerfile | awk '{printf "filename=%s", $0}' >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ${{steps.dockerfile.outputs.filename}}
tags: eyra-rank:latest
load: true
- name: Run prediction
run: docker run --rm -v "$(pwd)/.:/data" eyra-rank:latest /data/PreFer_fake_data.csv /data/PreFer_fake_background_data.csv --output /data/predictions.csv
- name: Check if file exists
run: |
if [ ! -f "predictions.csv" ]; then
echo "Predictions file not found. Please check the logs to see what went wrong."
exit 1
fi
- name: Build Docker scoring image
uses: docker/build-push-action@v4
with:
context: .
file: python.Dockerfile
tags: eyra-rank:scoring
load: true
- name: Run scoring
run: docker run --rm -v "$(pwd):/data" --entrypoint conda eyra-rank:scoring run -n eyra-rank python /app/score.py /data/predictions.csv /data/PreFer_fake_outcome.csv