-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (48 loc) · 1.49 KB
/
dvc-pipeline.yml
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
55
56
57
name: HparamSearch, Train Test, Infer and Report
on:
workflow_call:
workflow_dispatch:
pull_request:
branches: [ main ]
jobs:
hparamSearch-train-test-infer-and-report:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
repository-projects: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: iterative/setup-cml@v2
- name: Install uv
uses: astral-sh/setup-uv@v2
- name: Set up Python 3.11.7
run: uv python install 3.11.7
- name: Install dependencies
env:
UV_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu
run: |
uv sync
- name: Create credentials.json
env:
GDRIVE_CREDENTIALS_DATA: ${{ secrets.GDRIVE_CREDENTIALS_DATA }}
run: |
echo $GDRIVE_CREDENTIALS_DATA > credentials_1.json
cat credentials_1.json # (Optional) Print the content to ensure it's correct
- name: Modify DVC Remote
run: |
uv run dvc remote modify myremote --local gdrive_service_account_json_file_path credentials_1.json
- name: DVC Pull Data
run: |
uv run dvc pull -v
- name: Train model
run: |
rm report.md
uv run dvc repro -f
- name: Create CML report
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Comment hparams, acc, loss plots and table plots
cml comment create report.md