|
15 | 15 | type: choice |
16 | 16 | options: [cpu, cu128] |
17 | 17 | default: cpu |
| 18 | + framework_ref: |
| 19 | + description: "Exact framework source for diagnostic recording" |
| 20 | + type: string |
| 21 | + default: "1111c102092739070a59f8eb41f8008fc9709213" |
| 22 | + diagnostic_generation_fix: |
| 23 | + description: "Overlay the fixed generation config file on the older source for source comparison only" |
| 24 | + type: boolean |
| 25 | + default: false |
18 | 26 |
|
19 | 27 | permissions: |
20 | 28 | contents: read |
|
30 | 38 | env: |
31 | 39 | # Record the already-tested fixed PR build without merging upstream into |
32 | 40 | # contracts-proof. References remain candidates until source-specific review. |
33 | | - TRANSFORMERS_SHA: 1111c102092739070a59f8eb41f8008fc9709213 |
| 41 | + TRANSFORMERS_SHA: ${{ inputs.framework_ref || '1111c102092739070a59f8eb41f8008fc9709213' }} |
| 42 | + DIAGNOSTIC_GENERATION_FIX: ${{ inputs.diagnostic_generation_fix || 'false' }} |
34 | 43 | TORCH_INDEX: ${{ inputs.torch_index || 'cpu' }} |
35 | 44 | TMIC_SHA: 03500b0c365087d17ae048b3e00e11a9657a2982 |
36 | 45 | MIC_MODELS: ${{ inputs.model_select || 'whisper' }} |
|
46 | 55 | - uses: actions/checkout@v4 |
47 | 56 | with: |
48 | 57 | ref: ${{ env.TRANSFORMERS_SHA }} |
| 58 | + - name: Isolate the generation fix on the older source |
| 59 | + if: env.DIAGNOSTIC_GENERATION_FIX == 'true' |
| 60 | + run: | |
| 61 | + test "$TRANSFORMERS_SHA" = 11c4611c0f9826e452d5cdaae9afdd22cc5d5fe5 |
| 62 | + git fetch --depth 1 origin 1111c102092739070a59f8eb41f8008fc9709213 |
| 63 | + git show 1111c102092739070a59f8eb41f8008fc9709213:src/transformers/configuration_utils.py > src/transformers/configuration_utils.py |
| 64 | + git diff --check |
| 65 | + git diff --stat |
49 | 66 | - name: Install the package and pinned CPU runtime |
50 | 67 | run: | |
51 | 68 | git config --global --add safe.directory "$GITHUB_WORKSPACE" |
|
89 | 106 | models = {item['name'] for item in json.loads((root / 'models.json').read_text())['models']} |
90 | 107 | selected = os.environ['MIC_MODELS'].split() |
91 | 108 | assert selected and set(selected) <= models, selected |
92 | | - report = {'transformers_sha': os.environ['TRANSFORMERS_SHA'], 'package_sha': os.environ['TMIC_SHA'], 'torch_index': os.environ['TORCH_INDEX'], 'models': {}} |
| 109 | + report = {'transformers_sha': os.environ['TRANSFORMERS_SHA'], 'package_sha': os.environ['TMIC_SHA'], 'torch_index': os.environ['TORCH_INDEX'], 'diagnostic_generation_fix': os.environ['DIAGNOSTIC_GENERATION_FIX'], 'models': {}} |
93 | 110 | for name in selected: |
94 | 111 | workspace = root / 'projects' / name |
95 | 112 | lock_path = workspace / 'example/transformers/tests/contracts/fleet.lock' |
|
0 commit comments