Skip to content

Commit 611a5cc

Browse files
authored
Revert "Work-around for protobuf init crash in sentencepiece" (#9697)
Reverts #9693
1 parent 601d309 commit 611a5cc

File tree

5 files changed

+0
-34
lines changed

5 files changed

+0
-34
lines changed

.github/workflows/_test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ jobs:
107107
pip install fsspec
108108
pip install rich
109109
pip install flax
110-
pip install sentencepiece
111110
- name: Extra CI deps
112111
if: inputs.has_code_changes == 'true'
113112
shell: bash

test/run_tests.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,6 @@ function run_xla_op_tests3 {
266266

267267
function run_xla_op_tests4 {
268268
run_test "$_TEST_DIR/test_jax_interop.py"
269-
# issue #9691: random crashes with sentencepiece protobuf; run multiple times to trigger
270-
for i in $(seq 1 5); do
271-
run_test "$_TEST_DIR/test_sentencepiece_interop.py"
272-
done
273269
}
274270

275271
function run_xla_op_tests5 {

test/test_sentencepiece_interop.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

torch_xla/__init__.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,6 @@
77

88
import torch
99

10-
# issue 9691: ensure sentencepiece protobuf init happen between
11-
# torch/torch-xla protobuf inits to work-around protobuf crash
12-
try:
13-
import sentencepiece as spm
14-
sp_model = spm.SentencePieceProcessor()
15-
sp_model.load('')
16-
except:
17-
pass
18-
1910
import _XLAC
2011
from ._internal import tpu
2112
from .version import __version__

torchax/dev-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
torch==2.8.0 ; sys_platform == 'darwin' # macOS
33
torch==2.8.0+cpu; sys_platform != 'darwin' # Non-macOS (CPU-only), like on TPU
44
yapf==0.40.2 # N.B.: keep in sync with `infra/ansible/config/pip.yaml`, `.github/workflows/lintercheck.yml`
5-
jax==0.7.2 # N.B.: torchax breaks on newer JAX versions that would be pulled from `flax` dependencies
65
flax==0.10.6

0 commit comments

Comments
 (0)