-
Notifications
You must be signed in to change notification settings - Fork 156
WIP: adding pr label auto validation #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
3327dd9
adding pr label auto validation
cquil11 f523541
cant escalpe # in github actions i guess
cquil11 3e8a6b9
yes u can
cquil11 1695781
updating runners yaml file path
cquil11 9e9bab6
run on syncornize now too
cquil11 ddef572
append github workspace
cquil11 30b48d9
append github workspace pt 2
cquil11 c7a077d
actually we dont need runners config at a ll
cquil11 ff039ca
debug
cquil11 11980b0
debug 2
cquil11 dc61215
debug 3
cquil11 a99a6c7
debug 4
cquil11 2590b94
debug 5
cquil11 657a4da
debug 6
cquil11 0c762c7
support multiple labels
cquil11 d098ffc
debug 7
cquil11 9d264aa
debug 8
cquil11 67efd3c
debug 10
cquil11 94dca3f
debug 11
cquil11 1eff9c6
debug 12
cquil11 c3ce2b6
debug 13
cquil11 06dfb77
adding forward slash for prettier grouping matrix
cquil11 936fd2d
debug 14
cquil11 a370ae6
debug 15
cquil11 56cfa91
add validate gb200 logic
cquil11 af1d1bd
add validate gb200 logic pt 2
cquil11 c9d4f73
add validate gb200 logic pt 2
cquil11 9a02d95
Merge branch 'main' into pr-label-auto-validation
cquil11 7914fe2
Merge branch 'main' into pr-label-auto-validation
cquil11 d16a63e
add unlabeled event trigger
cquil11 1a2dded
remove gb200
cquil11 e80fa2d
Merge branch 'main' into pr-label-auto-validation
cquil11 cea3692
add collect results
cquil11 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,143 @@ | ||
| name: PR Label Validation | ||
| run-name: "Validate PR #${{ github.event.pull_request.number }}" | ||
|
|
||
| concurrency: | ||
| group: "PR#${{ github.event.pull_request.number }}" | ||
| cancel-in-progress: true | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [labeled, unlabeled, synchronize] | ||
|
|
||
| jobs: | ||
| get-jobs: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| search-space-config: ${{ steps.get-jobs.outputs.search-space-config }} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - id: get-jobs | ||
| shell: python | ||
| run: | | ||
| import json | ||
| import subprocess | ||
| import re | ||
| import os | ||
|
|
||
| # Get matching labels | ||
| labels = json.loads(r'''${{ toJson(github.event.pull_request.labels) }}''') | ||
| pattern = r'^([^_]+)_([^_]+)$' | ||
|
|
||
| matching = [] | ||
| for label in labels: | ||
| match = re.match(pattern, label['name']) | ||
| if match: | ||
| runner_type = match.group(1) | ||
| model_prefix = match.group(2) | ||
|
|
||
| matching.append({'runner-type': runner_type, 'model-prefix': model_prefix}) | ||
| print(f"Matched label: {label['name']}") | ||
|
|
||
| if not matching: | ||
| print("No matching labels found") | ||
| with open(os.environ['GITHUB_OUTPUT'], 'a') as f: | ||
| f.write('search-space-config=[]\n') | ||
| exit(0) | ||
|
|
||
| # Generate configs for standard labels | ||
| all_configs = [] | ||
| if matching: | ||
| subprocess.run(['pip', 'install', 'pydantic'], check=True) | ||
|
|
||
| for label in matching: | ||
| result = subprocess.run([ | ||
| 'python3', f"{os.environ['GITHUB_WORKSPACE']}/utils/matrix-logic/generate_sweep_configs.py", | ||
| 'full-sweep', | ||
| '--runner-type', label['runner-type'], | ||
| '--model-prefix', label['model-prefix'], | ||
| '--seq-lens', '1k1k', | ||
| '--test-mode', | ||
| '--config-files', | ||
| f"{os.environ['GITHUB_WORKSPACE']}/.github/configs/nvidia-master.yaml", | ||
| f"{os.environ['GITHUB_WORKSPACE']}/.github/configs/amd-master.yaml", | ||
| '--runner-config', f"{os.environ['GITHUB_WORKSPACE']}/.github/configs/runners.yaml" | ||
| ], capture_output=True, text=True) | ||
|
|
||
| if result.returncode != 0: | ||
| print(f"Error generating configs:") | ||
| print(f"STDOUT: {result.stdout}") | ||
| print(f"STDERR: {result.stderr}") | ||
| exit(1) | ||
|
|
||
| all_configs.extend(json.loads(result.stdout)) | ||
|
|
||
| print(f"Total standard configs: {len(all_configs)}") | ||
|
|
||
| with open(os.environ['GITHUB_OUTPUT'], 'a') as f: | ||
| f.write(f'search-space-config={json.dumps(all_configs)}\n') | ||
|
|
||
| validate: | ||
| needs: get-jobs | ||
| if: ${{ needs.get-jobs.outputs.search-space-config != '[]' }} | ||
| uses: ./.github/workflows/benchmark-tmpl.yml | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| config: ${{ fromJson(needs.get-jobs.outputs.search-space-config) }} | ||
| secrets: inherit | ||
| name: validate ${{ matrix.config.runner }} | ||
| with: | ||
| exp-name: ${{ matrix.config.exp-name }} | ||
| isl: ${{ matrix.config.isl }} | ||
| osl: ${{ matrix.config.osl }} | ||
| max-model-len: ${{ matrix.config.max-model-len }} | ||
| runner: ${{ matrix.config.runner }} | ||
| image: ${{ matrix.config.image }} | ||
| model: ${{ matrix.config.model }} | ||
| framework: ${{ matrix.config.framework }} | ||
| precision: ${{ matrix.config.precision }} | ||
| tp: ${{ matrix.config.tp }} | ||
| ep: ${{ matrix.config.ep }} | ||
| dp-attn: ${{ matrix.config.dp-attn }} | ||
| conc: ${{ matrix.config.conc }} | ||
|
|
||
| collect-results: | ||
| needs: validate | ||
| if: ${{ always() }} | ||
| uses: ./.github/workflows/collect-results.yml | ||
| secrets: inherit | ||
|
|
||
| calc-success-rate: | ||
| needs: collect-results | ||
| if: ${{ always() }} | ||
| runs-on: ubuntu-latest | ||
|
|
||
| env: | ||
| RESULTS_DIR: "results/" | ||
| STATS_FILENAME: "run_stats" | ||
| GITHUB_TOKEN: ${{ secrets.REPO_PAT }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
|
cquil11 marked this conversation as resolved.
|
||
| with: | ||
| token: ${{ secrets.REPO_PAT }} | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Download results artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| path: ${{ env.RESULTS_DIR }} | ||
| pattern: results_* | ||
|
|
||
| - name: Install python dependencies | ||
| run: pip install PyGithub | ||
|
|
||
| - name: Calculate success rate | ||
| run: python3 utils/calc_success_rate.py $STATS_FILENAME | ||
|
|
||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: "run-stats" | ||
| path: ${{ env.STATS_FILENAME }}.json | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.