Skip to content

Commit ffe30f0

Browse files
committed
Add source-isolation mode to Whisper recording workflow
1 parent a38690d commit ffe30f0

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

‎.github/workflows/contracts-record.yml‎

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ on:
1515
type: choice
1616
options: [cpu, cu128]
1717
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
1826

1927
permissions:
2028
contents: read
@@ -30,7 +38,8 @@ jobs:
3038
env:
3139
# Record the already-tested fixed PR build without merging upstream into
3240
# 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' }}
3443
TORCH_INDEX: ${{ inputs.torch_index || 'cpu' }}
3544
TMIC_SHA: 03500b0c365087d17ae048b3e00e11a9657a2982
3645
MIC_MODELS: ${{ inputs.model_select || 'whisper' }}
@@ -46,6 +55,14 @@ jobs:
4655
- uses: actions/checkout@v4
4756
with:
4857
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
4966
- name: Install the package and pinned CPU runtime
5067
run: |
5168
git config --global --add safe.directory "$GITHUB_WORKSPACE"
@@ -89,7 +106,7 @@ jobs:
89106
models = {item['name'] for item in json.loads((root / 'models.json').read_text())['models']}
90107
selected = os.environ['MIC_MODELS'].split()
91108
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': {}}
93110
for name in selected:
94111
workspace = root / 'projects' / name
95112
lock_path = workspace / 'example/transformers/tests/contracts/fleet.lock'

0 commit comments

Comments
 (0)