File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : " Run Sweep"
2+ run-name : Run Sweep - ${{ github.event.pull_request.title || github.ref_name }}
23
34on :
45 workflow_dispatch :
56 push :
67 branches :
78 - main
8- - diff-only-runs
9- # paths:
10- # - "perf-changelog.yaml"
9+ paths :
10+ - " perf-changelog.yaml"
11+ pull_request :
12+ branches :
13+ - main
14+ types :
15+ - ready_for_review
16+ - synchronize
17+ paths :
18+ - " perf-changelog.yaml"
1119
1220jobs :
1321 get-jobs :
@@ -22,11 +30,18 @@ jobs:
2230
2331 - id : get-jobs
2432 run : |
25- pip install pydantic
33+ if [ "${{ github.event_name }}" == "pull_request" ]; then
34+ BASE_REF="origin/${{ github.base_ref }}"
35+ HEAD_REF="${{ github.event.pull_request.head.sha }}"
36+ else
37+ BASE_REF="${{ github.event.before }}"
38+ HEAD_REF="${{ github.event.after }}"
39+ fi
40+
2641 CONFIG_JSON=$(python3 ${GITHUB_WORKSPACE}/utils/process_changelog.py \
2742 --changelog-file ${GITHUB_WORKSPACE}/perf-changelog.yaml \
28- --base-ref origin/main \
29- --head-ref ${{ github.sha }} )
43+ --base-ref "$BASE_REF" \
44+ --head-ref "$HEAD_REF" )
3045
3146 echo "search-space-config=$CONFIG_JSON" >> $GITHUB_OUTPUT
3247
Original file line number Diff line number Diff line change 11import argparse
22import json
3- from pprint import pprint
43import re
54import subprocess
65from collections import defaultdict
76
87import yaml
98from constants import GENERATE_SWEEPS_PY_SCRIPT , MASTER_CONFIGS , RUNNER_CONFIG
10- from matrix_logic .generate_sweep_configs import (
11- seq_len_itos ,
12- seq_len_stoi ,
13- seq_len_to_str ,
14- )
9+ from matrix_logic .generate_sweep_configs import seq_len_to_str
1510from matrix_logic .validation import load_config_files
1611from pydantic import BaseModel , ConfigDict , Field
1712
@@ -132,7 +127,6 @@ def main():
132127 else :
133128 final_results ["single_node" ][seq_len_str ].append (result )
134129
135- # pprint(final_results)
136130 print (json .dumps (final_results ))
137131
138132
You can’t perform that action at this time.
0 commit comments