Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 0 additions & 70 deletions .github/ci.yml

This file was deleted.

65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Testing Model Accuracy

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

permissions:
contents: read
pull-requests: write
issues: write

jobs:
test-model:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"

- name: Install dependencies
run: |
if [ -f requirements.txt ]; then
pip install -r requirements.txt
fi
pip install scikit-learn pandas matplotlib seaborn

- name: Run model evaluation
id: model_eval
run: |
mkdir -p reports
python test/test-model.py > metrics.txt
echo "METRICS<<EOF" >> $GITHUB_ENV
cat metrics.txt >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV

- name: Upload confusion matrix plots
uses: actions/upload-artifact@v4
with:
name: confusion-matrix-plots
path: reports/*.png
continue-on-error: true

- name: Comment on PR with results
if: github.event_name == 'pull_request'
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
## 🧪 Model Evaluation Results
✅ Tests executed successfully!

**Metrics:**
```
${{ env.METRICS }}
```

📊 Confusion matrix plots have been uploaded as workflow artifacts.
Binary file added artifacts/Models/model.pkl
Binary file not shown.
Binary file added artifacts/Models/ordinal_xgb_model.pkl
Binary file not shown.
801 changes: 801 additions & 0 deletions data/test/test_data.csv

Large diffs are not rendered by default.

Loading
Loading