Skip to content

Commit e4a98ad

Browse files
fix: Downgrade the Transformers' version to match with the JetStream version (GoogleCloudPlatform#1286)
Since `JetStream` has not been updated for some time, it attempts to call the `.squeeze()` method on `Transformers` objects, a method that is no longer supported in newer versions of the library (e.g., 5.5.4 or 5.9.0). Thus, downgrade the `Transformers` to version 4.57.3.
1 parent 3f14eff commit e4a98ad

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

dags/multipod/maxtext_sft_trainer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,12 @@
5353
f'export HF_TOKEN={HF_TOKEN}',
5454
'export PRE_TRAINED_MODEL=llama2-7b',
5555
'export PRE_TRAINED_MODEL_TOKENIZER=meta-llama/Llama-2-7b-chat-hf',
56-
'export PRE_TRAINED_MODEL_CKPT_PATH=gs://maxtext-model-checkpoints/llama2-7b-chat/scanned/0/items',
56+
'export PRE_TRAINED_MODEL_CKPT_PATH='
57+
'gs://maxtext-model-checkpoints/llama2-7b-chat/scanned/0/items',
5758
f'export BASE_OUTPUT_DIRECTORY={base_output_directory}',
5859
'export STEPS=1000',
5960
'export PROMPT="Suggest some famous landmarks in London."',
61+
'pip install transformers==4.57.3',
6062
'bash tests/end_to_end/tpu/test_sft_trainer.sh',
6163
)
6264
maxtext_v4_configs_test = gke_config.get_gke_config(
@@ -69,4 +71,4 @@
6971
).run()
7072
test.append(maxtext_v4_configs_test)
7173
for i in range(len(test) - 1):
72-
test[i] >> test[i + 1]
74+
_ = test[i] >> test[i + 1]

0 commit comments

Comments
 (0)