-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (72 loc) · 3.05 KB
/
experiments.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Train Trigger
on:
pull_request:
types: [opened]
issue_comment:
types: [created]
jobs:
experiments-on-jarvislabs:
runs-on: ubuntu-latest
steps:
- uses: octokit/request-action@v2.0.0
name: GitHub API Request
id: request
with:
route: ${{ github.event.issue.pull_request.url }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get PR informations
id: pr_data
run: |
echo "::set-output name=number::${{ fromJson(steps.request.outputs.data).number }}"
echo "::set-output name=branch::${{ fromJson(steps.request.outputs.data).head.ref }}"
echo "::set-output name=repo_owner::${{ github.event.repository.owner.login }}"
echo "::set-output name=comment_owner::${{ github.event.sender.login }}"
echo "::set-output name=comment::${{ github.event.comment.body }}"
- name: Extract comment
if: ${{ steps.pr_data.outputs.repo_owner == steps.pr_data.outputs.comment_owner }}
run: |
echo "Eligible!!"
- uses: khan/pull-request-comment-trigger@v1.1.0
name: Listen to comment on PR (training)
id: check_dvclive
if: ${{ steps.pr_data.outputs.repo_owner == steps.pr_data.outputs.comment_owner }}
with:
trigger: '#train --with dvclive'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- uses: khan/pull-request-comment-trigger@v1.1.0
name: Listen to comment on PR (training)
id: check_wandb
if: ${{ steps.pr_data.outputs.repo_owner == steps.pr_data.outputs.comment_owner }}
with:
trigger: '#train --with wandb'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- uses: actions/checkout@v3
name: clone branch of PR
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ steps.pr_data.outputs.branch }}
- name: clone branch of PR
if: steps.check_dvclive.outputs.triggered == 'true'
uses: ./.github/actions/exp/jl-dvc
with:
CUR_BRANCH: ${{ steps.pr_data.outputs.branch }}
CUR_PR_ID: ${{ steps.pr_data.outputs.number }}
GDRIVE_CREDENTIAL: ${{ secrets.GDRIVE_CREDENTIAL }}
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
JARVISLABS_ID: ${{ secrets.JARVISLABS_USER_EMAIL }}
JARVISLABS_ACCESS_TOKEN: ${{ secrets.JARVISLABS_ACCESS_TOKEN }}
- name: clone branch of PR
if: steps.check_wandb.outputs.triggered == 'true'
uses: ./.github/actions/exp/jl-wandb
with:
CUR_BRANCH: ${{ steps.pr_data.outputs.branch }}
CUR_PR_ID: ${{ steps.pr_data.outputs.number }}
GDRIVE_CREDENTIAL: ${{ secrets.GDRIVE_CREDENTIAL }}
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
JARVISLABS_ID: ${{ secrets.JARVISLABS_USER_EMAIL }}
JARVISLABS_ACCESS_TOKEN: ${{ secrets.JARVISLABS_ACCESS_TOKEN }}
WANDB_PROJECT: ${{ secrets.WANDB_PROJECT }}
WANDB_API_KEY: ${{ secrets.WANDB_API_KEY }}