-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (40 loc) · 1.71 KB
/
add-forecast.yaml
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
name: add-forecast
on:
schedule:
- cron: '0 7 * * 1'
jobs:
run:
runs-on: [ubuntu-latest]
container: docker://eamon/random-walks:2020-08-06
steps:
- uses: actions/checkout@v2
- name: pipeline-adder
env:
repo_token: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
dvc pull --run-cache || true
today=$(date +%F)
fdt=$today ./forecast.sh
ddt=$today ./score.sh
fdt=$today ddt=$today ./visualize-forecasts.sh
dvc push
git config --local user.email "actions@users.noreply.github.com"
git config --local user.name "Automated Publisher"
git add dvc.yaml dvc.lock metrics visuals
if git commit -m "Weekly forecast, score, and plot pipeline additions" && git push;
then
echo "# Running times" > report.md
dvc metrics show >> report.md
echo "# Plots" >> report.md
dvc plots show --show-vega metrics/${today}-score-by-loc-type.csv >vega.json
vl2png vega.json -s 1.5 | cml-publish --md >> report.md
dvc plots show --show-vega metrics/${today}-score-by-loc-type-targ-type.csv >vega.json
vl2png vega.json -s 1.5 | cml-publish --md >> report.md
dvc plots show --show-vega metrics/${today}-score-by-loc-type-targ-type-forecast-date.csv >vega.json
vl2png vega.json -s 1.5 | cml-publish --md >> report.md
else
echo "No changes to outputs." > report.md
fi
cml-send-comment report.md