-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (42 loc) · 1.75 KB
/
cml.yaml
File metadata and controls
54 lines (42 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: validate-model
on:
workflow_dispatch:
pull_request:
branches: main
jobs:
cml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: iterative/setup-cml@v2
- uses: astral-sh/setup-uv@v1
- uses: actions/setup-python@v4
with:
python-version-file: ".python-version"
- name: Run model validation
env:
repo_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: |
# Configure PAT to git clone the private repo: pg2-dataset
git config --global credential.helper store
echo "https://${{ secrets.USERNAME }}:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com" > ~/.git-credentials
uv sync
# Run DVC repro
echo "https://${{ secrets.USERNAME }}:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com" > supervised/git-auth.txt
echo "https://${{ secrets.USERNAME }}:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com" > zero_shot/git-auth.txt
uv run dvc repro supervised/dvc.yaml
uv run dvc repro zero_shot/dvc.yaml
# Create report with metrics
# Pick one supervised model
echo "✅ Supervised models have all passed validation." >> report.md
echo '```csv' >> report.md
cat ./supervised/metric/local/charge_ladder_pls.csv >> report.md
echo '```' >> report.md
# Pick one zero-shot model
echo "✅ Zero-shot models have all passed validation." >> report.md
echo '```csv' >> report.md
cat ./zero_shot/metric/local/ranganathan_esm.csv >> report.md
echo '```' >> report.md
# Send comment to PR
echo "Send comment to PR"
cml comment create report.md