File tree Expand file tree Collapse file tree 3 files changed +75
-2
lines changed
Expand file tree Collapse file tree 3 files changed +75
-2
lines changed Original file line number Diff line number Diff line change 1+ [core]
2+ remote = storage
3+ ['remote "storage"']
4+ url = gdrive://1gRkn11DXoANBF9CGXOsiZyJCjLKoeO_4
5+ gdrive_client_id = 49626850770-j19rjs1gp2p67qam8q7dnfoeq3oq1475.apps.googleusercontent.com
6+ gdrive_client_secret = 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
7+ gdrive_acknowledge_abuse = true
Original file line number Diff line number Diff line change 1+ name : Model Training & Testing
2+
3+
4+ on :
5+ push :
6+ branches : [main, yml_workflow]
7+ pull_request :
8+ branches : [main]
9+
10+ workflow_dispatch : # Allows manual trigger
11+
12+ jobs :
13+ train-and-test :
14+ runs-on : ubuntu-latest
15+
16+ env :
17+ PYTHONPATH : ${{ github.workspace }}
18+
19+ steps :
20+ - name : checkout code
21+ uses : actions/checkout@v3
22+
23+ - name : Set up Python
24+ uses : actions/setup-python@v4
25+ with :
26+ python-verson : ' 3.10'
27+
28+ - name : Install dependencies
29+ run : |
30+ python -m pip install --upgrade pip
31+ pip install -r requirements.txt
32+ pip install "dvc[gdrive]"
33+
34+
35+ - name : Configure DVC with Service Account
36+ env :
37+ GCP_SA_KEY : ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
38+ run : |
39+ echo "$GCP_SA_KEY" > service_account.json
40+ dvc remote modify storage gdrive_use_service_account true
41+ dvc remote modify storage gdrive_service_account_json_file_path service_account.json
42+ working-directory : .
43+
44+
45+ - name : Pull data from Google drive
46+ run : |
47+ dvc pull
48+
49+ - name : Run Pre-processing
50+ run : |
51+ python src/preprocess.py
52+
53+ - name : Train Model
54+ run : |
55+ python src/train.py
56+
57+ - name : Upload model artifacts
58+ uses : actions/upload-artifact@v4
59+ with :
60+ name : trained-model
61+ path : data/models/
62+ retention-days : 7
Original file line number Diff line number Diff line change @@ -18,7 +18,11 @@ data/models/
1818# Tools
1919
2020mlruns /
21- .dvc /
2221.env
2322
24- * .html
23+ * .html
24+
25+ # DVC - ignore cache and temp, but track config
26+ .dvc /cache /
27+ .dvc /tmp /
28+ .dvc /config.local
You can’t perform that action at this time.
0 commit comments