Skip to content

Commit

Permalink
Added check for predictions file
Browse files Browse the repository at this point in the history
  • Loading branch information
vloothuis committed May 9, 2024
1 parent 7d3c978 commit 3053bea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ jobs:
- 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:
Expand Down
5 changes: 0 additions & 5 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,5 @@ def predict(data_path, background_data_path, output):


if __name__ == "__main__":
import sys

print("Forced error")
sys.exit(1)

args = parser.parse_args()
predict(args.data_path, args.background_data_path, args.output)

0 comments on commit 3053bea

Please sign in to comment.