Skip to content

Commit 7527cb8

Browse files
authored
Remove torchdata==0.9.0 pin and torchtext as deprecated and CI fixes (#4849) (#4860)
This is a prerequisite for adding the next commits to enable python3.13 and 3.14 wheel builds: * 74f98d2 3.13 * 83341cf 3.14 lin * #4858 3.14 win --------- Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 59c4c0a commit 7527cb8

File tree

6 files changed

+9
-38
lines changed

6 files changed

+9
-38
lines changed

.github/workflows/e2e-reusable.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@ jobs:
9090
# cmake<4.0.0 is required as a workaround for CMake Error at third_party/double-conversion/CMakeLists.txt:1 (cmake_minimum_required)
9191
pip install wheel 'cmake<4.0.0'
9292
93-
# https://github.com/pytorch/data/blob/e316c5ca1ab2a4f69dd6d48e8fc9c6f8d0c7c468/README.md?plain=1#L6-L15
94-
- name: Install pinned torchdata
95-
run: |
96-
pip install torchdata==0.9.0
97-
9893
- name: Setup PyTorch
9994
uses: ./.github/actions/setup-pytorch
10095
with:
@@ -105,7 +100,6 @@ jobs:
105100
cd pytorch
106101
echo "BENCHMARK_COMMIT_ID=$(<.github/ci_commit_pins/torchbench.txt)" | tee -a "$GITHUB_ENV"
107102
echo "TORCHVISION_COMMIT_ID=$(<.github/ci_commit_pins/vision.txt)" | tee -a "$GITHUB_ENV"
108-
echo "TORCHTEXT_COMMIT_ID=$(<.github/ci_commit_pins/text.txt)" | tee -a "$GITHUB_ENV"
109103
echo "TORCHAUDIO_COMMIT_ID=$(<.github/ci_commit_pins/audio.txt)" | tee -a "$GITHUB_ENV"
110104
echo "TRANSFORMERS_VERSION=$(<.ci/docker/ci_commit_pins/huggingface.txt)" | tee -a "$GITHUB_ENV"
111105
echo "TIMM_COMMIT_ID=$(<.ci/docker/ci_commit_pins/timm.txt)" | tee -a "$GITHUB_ENV"
@@ -163,15 +157,6 @@ jobs:
163157
ref: ${{ env.TORCHVISION_COMMIT_ID }}
164158
extra-cache-key: ${{ env.PYTORCH_VERSION }}
165159

166-
- name: Install torchtext package
167-
if: ${{ inputs.suite == 'torchbench' }}
168-
uses: ./.github/actions/install-dependency
169-
with:
170-
package: torchtext
171-
repository: pytorch/text
172-
ref: ${{ env.TORCHTEXT_COMMIT_ID }}
173-
extra-cache-key: ${{ env.PYTORCH_VERSION }}
174-
175160
- name: Install torchaudio package
176161
if: ${{ inputs.suite == 'torchbench' }}
177162
uses: ./.github/actions/install-dependency
@@ -273,7 +258,6 @@ jobs:
273258
TRITON_REPO=$GITHUB_REPOSITORY
274259
TRITON_COMMIT_ID=$GITHUB_SHA
275260
TORCHVISION_COMMIT_ID=$TORCHVISION_COMMIT_ID
276-
TORCHTEXT_COMMIT_ID=$TORCHTEXT_COMMIT_ID
277261
TORCHAUDIO_COMMIT_ID=$TORCHAUDIO_COMMIT_ID
278262
TRANSFORMERS_VERSION=$TRANSFORMERS_VERSION
279263
TIMM_COMMIT_ID=$TIMM_COMMIT_ID

.github/workflows/e2e-windows.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ jobs:
204204
cd c:/pytorch
205205
echo "BENCHMARK_COMMIT_ID=$(<.github/ci_commit_pins/torchbench.txt)" | tee -a "$GITHUB_ENV"
206206
echo "TORCHVISION_COMMIT_ID=$(<.github/ci_commit_pins/vision.txt)" | tee -a "$GITHUB_ENV"
207-
echo "TORCHTEXT_COMMIT_ID=$(<.github/ci_commit_pins/text.txt)" | tee -a "$GITHUB_ENV"
208207
echo "TORCHAUDIO_COMMIT_ID=$(<.github/ci_commit_pins/audio.txt)" | tee -a "$GITHUB_ENV"
209208
echo "TRANSFORMERS_VERSION=$(<.ci/docker/ci_commit_pins/huggingface.txt)" | tee -a "$GITHUB_ENV"
210209
echo "TIMM_COMMIT_ID=$(<.ci/docker/ci_commit_pins/timm.txt)" | tee -a "$GITHUB_ENV"
@@ -237,7 +236,6 @@ jobs:
237236
TRITON_REPO=$GITHUB_REPOSITORY
238237
TRITON_COMMIT_ID=$GITHUB_SHA
239238
TORCHVISION_COMMIT_ID=$TORCHVISION_COMMIT_ID
240-
TORCHTEXT_COMMIT_ID=$TORCHTEXT_COMMIT_ID
241239
TORCHAUDIO_COMMIT_ID=$TORCHAUDIO_COMMIT_ID
242240
TRANSFORMERS_VERSION=$TRANSFORMERS_VERSION
243241
TIMM_COMMIT_ID=$TIMM_COMMIT_ID

.github/workflows/nightly-wheels.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,13 @@ jobs:
4949
# cmake 3.22.1 does not work with the recent torchaudio: https://github.com/intel/intel-xpu-backend-for-triton/issues/2079
5050
pip install wheel cmake
5151
52-
# https://github.com/pytorch/data/blob/e316c5ca1ab2a4f69dd6d48e8fc9c6f8d0c7c468/README.md?plain=1#L6-L15
53-
- name: Install pinned torchdata
54-
run: |
55-
pip install torchdata==0.9.0
56-
5752
- name: Setup PyTorch
5853
uses: ./.github/actions/setup-pytorch
5954

6055
- name: Identify pinned versions
6156
run: |
6257
cd pytorch
6358
echo "TORCHVISION_COMMIT_ID=$(<.github/ci_commit_pins/vision.txt)" | tee -a $GITHUB_ENV
64-
echo "TORCHTEXT_COMMIT_ID=$(<.github/ci_commit_pins/text.txt)" | tee -a $GITHUB_ENV
6559
echo "TORCHAUDIO_COMMIT_ID=$(<.github/ci_commit_pins/audio.txt)" | tee -a $GITHUB_ENV
6660
echo "TRANSFORMERS_VERSION=$(<.ci/docker/ci_commit_pins/huggingface.txt)" | tee -a $GITHUB_ENV
6761
echo "TIMM_COMMIT_ID=$(<.ci/docker/ci_commit_pins/timm.txt)" | tee -a $GITHUB_ENV
@@ -85,14 +79,6 @@ jobs:
8579
ref: ${{ env.TORCHVISION_COMMIT_ID }}
8680
extra-cache-key: ${{ env.PYTORCH_VERSION }}
8781

88-
- name: Install torchtext package
89-
uses: ./.github/actions/install-dependency
90-
with:
91-
package: torchtext
92-
repository: pytorch/text
93-
ref: ${{ env.TORCHTEXT_COMMIT_ID }}
94-
extra-cache-key: ${{ env.PYTORCH_VERSION }}
95-
9682
- name: Install torchaudio package
9783
uses: ./.github/actions/install-dependency
9884
with:
@@ -124,7 +110,6 @@ jobs:
124110
cp -L pytorch/dist/*.whl wheels/
125111
cp -L dist/*.whl wheels/
126112
cp -L torchvision*/dist/*.whl wheels/
127-
cp -L torchtext*/dist/*.whl wheels/
128113
cp -L torchaudio*/dist/*.whl wheels/
129114
cp -L timm*/dist/*.whl wheels/
130115
cp -L transformers*/dist/*.whl wheels/
@@ -148,7 +133,6 @@ jobs:
148133
TRITON_REPO=intel/intel-xpu-backend-for-triton
149134
TRITON_COMMIT_ID=$TRITON_COMMIT_ID
150135
TORCHVISION_COMMIT_ID=$TORCHVISION_COMMIT_ID
151-
TORCHTEXT_COMMIT_ID=$TORCHTEXT_COMMIT_ID
152136
TORCHAUDIO_COMMIT_ID=$TORCHAUDIO_COMMIT_ID
153137
EOF
154138

python/test/unit/language/test_core.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2447,7 +2447,12 @@ def kernel(X, Z, BLOCK: tl.constexpr):
24472447
# input
24482448
rs = RandomState(17)
24492449
# limit the range of integers so that the sum does not overflow
2450-
x = numpy_random((shape, ), dtype_str=dtype_str, rs=rs)
2450+
if dtype_str in integral_dtypes:
2451+
low = 0 if dtype_str in uint_dtypes else -100
2452+
high = 100
2453+
x = numpy_random((shape, ), dtype_str=dtype_str, rs=rs, low=low, high=high)
2454+
else:
2455+
x = numpy_random((shape, ), dtype_str=dtype_str, rs=rs)
24512456
numpy_op = {
24522457
'sum': np.sum,
24532458
'max': np.max,

scripts/install-pytorch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ fi
9090
############################################################################
9191
# Check installed torch pinned dependencies
9292

93-
PINNED_TORCH_DEPENDENCIES_REGEX="^torchtext==|^torchaudio==|^torchvision=="
93+
PINNED_TORCH_DEPENDENCIES_REGEX="^torchaudio==|^torchvision=="
9494
INSTALLED_PINNED_TORCH_DEPENDENCIES=$(pip list --format=freeze | grep -iE "$PINNED_TORCH_DEPENDENCIES_REGEX" || true)
9595

9696
if [ -n "$INSTALLED_PINNED_TORCH_DEPENDENCIES" ]; then
@@ -104,7 +104,7 @@ if [ -n "$INSTALLED_PINNED_TORCH_DEPENDENCIES" ]; then
104104
echo "**** INFO: PyTorch pinned dependencies build from source mode is not supported. ****"
105105
exit 1
106106
fi
107-
pip uninstall -y torchtext torchaudio torchvision
107+
pip uninstall -y torchaudio torchvision
108108
fi
109109

110110
############################################################################

scripts/patch-pytorch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ apply_patch() {
3535
echo "Applying PyTorch patches in $REPO_ROOT"
3636

3737
# put your patch applies here
38-
apply_patch https://github.com/pytorch/pytorch/pull/143553.diff
38+
# apply_patch https://github.com/pytorch/pytorch/pull/143553.diff
3939
apply_patch pytorch_fp64.patch

0 commit comments

Comments
 (0)