mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
The 2 actions actions/download-artifact@v3 and actions/upload-artifact@v3 will be deprecated December 5th, 2024. This change updates them to using v4. Pull Request resolved: https://github.com/pytorch/pytorch/pull/139808 Approved by: https://github.com/seemethere
94 lines
3.2 KiB
YAML
94 lines
3.2 KiB
YAML
name: target-determination
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
|
|
get-label-type:
|
|
name: get-label-type
|
|
# Don't run on forked repos
|
|
if: github.repository_owner == 'pytorch'
|
|
uses: pytorch/pytorch/.github/workflows/_runner-determinator.yml@main
|
|
with:
|
|
triggering_actor: ${{ github.triggering_actor }}
|
|
issue_owner: ${{ github.event.pull_request.user.login || github.event.issue.user.login }}
|
|
curr_branch: ${{ github.head_ref || github.ref_name }}
|
|
curr_ref_type: ${{ github.ref_type }}
|
|
|
|
target-determination:
|
|
# Don't run on forked repos
|
|
if: github.repository_owner == 'pytorch'
|
|
runs-on: "${{ needs.get-label-type.outputs.label-type }}linux.2xlarge"
|
|
needs: get-label-type
|
|
steps:
|
|
# [pytorch repo ref]
|
|
# Use a pytorch/pytorch reference instead of a reference to the local
|
|
# checkout because when we run this action we don't *have* a local
|
|
# checkout. In other cases you should prefer a local checkout.
|
|
- name: Checkout PyTorch
|
|
uses: pytorch/pytorch/.github/actions/checkout-pytorch@main
|
|
with:
|
|
submodules: false
|
|
|
|
- name: Setup Linux
|
|
uses: ./.github/actions/setup-linux
|
|
|
|
- name: Get workflow job id
|
|
id: get-job-id
|
|
uses: ./.github/actions/get-workflow-job-id
|
|
if: always()
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Download pytest cache
|
|
uses: ./.github/actions/pytest-cache-download
|
|
continue-on-error: true
|
|
with:
|
|
cache_dir: .pytest_cache
|
|
job_identifier: ${{ github.workflow }}
|
|
|
|
- name: Download LLM Artifacts from S3
|
|
uses: seemethere/download-artifact-s3@v4
|
|
continue-on-error: true
|
|
with:
|
|
name: llm_results
|
|
path: .additional_ci_files/llm_results
|
|
|
|
- name: Do TD
|
|
id: td
|
|
continue-on-error: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
GITHUB_WORKFLOW: ${{ github.workflow }}
|
|
GITHUB_JOB: ${{ github.job }}
|
|
GITHUB_RUN_ID: ${{ github.run_id }}
|
|
GITHUB_RUN_NUMBER: ${{ github.run_number }}
|
|
GITHUB_RUN_ATTEMPT: ${{ github.run_attempt }}
|
|
GITHUB_REF: ${{ github.ref }}
|
|
JOB_ID: ${{ steps.get-job-id.outputs.job-id }}
|
|
JOB_NAME: ${{ steps.get-job-id.outputs.job-name }}
|
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
run: |
|
|
unzip -o .additional_ci_files/llm_results/mappings.zip -d .additional_ci_files/llm_results || true
|
|
python3 -m pip install boto3==1.35.42
|
|
python3 tools/testing/do_target_determination_for_s3.py
|
|
|
|
- name: Upload TD results to s3
|
|
uses: seemethere/upload-artifact-s3@v5
|
|
if: steps.td.outcome == 'success'
|
|
with:
|
|
name: td_results
|
|
retention-days: 14
|
|
if-no-files-found: error
|
|
path: td_results.json
|
|
|
|
- name: Store TD results on GHA
|
|
uses: actions/upload-artifact@v4
|
|
if: steps.td.outcome == 'success'
|
|
with:
|
|
name: td_results.json
|
|
retention-days: 14
|
|
if-no-files-found: error
|
|
path: td_results.json
|