This repository has been archived by the owner on Dec 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
/
repo-dispatch.yaml
58 lines (51 loc) · 1.99 KB
/
repo-dispatch.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
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Receive Repository Dispatch Payload
on: repository_dispatch
jobs:
process-repository-dispatch:
if: github.actor == 'pr-chatops[bot]' || github.actor == 'hamelsmu' || github.actor == 'hohsiangwu'
runs-on: ubuntu-latest
steps:
- name: Copy Repository Contents
uses: actions/checkout@master
- name: handle repo dispatch payload
id: rd
run: |
python3 action_files/repo_dispatch_handler.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get Runs Using SHA
uses: machine-learning-apps/wandb-action@master
if: steps.rd.outputs.CONCLUSION == 'success'
id: wandb
with:
PROJECT_NAME: ${{ format('{0}/{1}', secrets.WANDB_ENTITY, secrets.WANDB_PROJECT) }}
FILTER_GITHUB_SHA: ${{ steps.rd.outputs.SHA }}
BASELINE_TAGS: "['baseline', 'reference']"
DISPLAY_METRICS: "['accuracy', 'loss', 'val_accuracy', 'val_loss', '_runtime']"
WANDB_API_KEY: ${{ secrets.WANDB_API_KEY }}
DEBUG: 'true'
- name: Upload csv
if: steps.wandb.outputs.BOOL_COMPLETE == 'true' && steps.rd.outputs.CONCLUSION == 'success'
uses: actions/upload-artifact@v1
with:
name: wandb_report
path: wandb_report.csv
- name: process_data
if: steps.wandb.outputs.BOOL_COMPLETE == 'true' && steps.rd.outputs.CONCLUSION == 'success'
run: |
cd $GITHUB_WORKSPACE
sudo apt-get install python3-setuptools
pip3 install wheel
pip3 install pandas==0.25.1 tabulate==0.8.5 requests==2.22.0
python3 action_files/wandb_results.py
env:
PR_NUM: ${{ steps.rd.outputs.ISSUE_NUMBER }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: update status of check run
run: |
cd $GITHUB_WORKSPACE
python3 action_files/clear_check_run.py
env:
WORKFLOW_CONCLUSION: ${{ steps.rd.outputs.CONCLUSION }}
SHA: ${{ steps.rd.outputs.SHA }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}