File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818from maxtext .utils .globals import MAXTEXT_ASSETS_ROOT
1919from maxtext .input_pipeline import input_pipeline_utils
2020from maxtext .trainers .tokenizer import train_tokenizer
21+ from maxtext .common .gcloud_stub import is_decoupled
2122
2223import unittest
2324import pytest
2425import subprocess
2526import os
2627
2728
29+ @unittest .skipIf (is_decoupled (), "Bypassed in offline decoupled runs (no GCS/internet)" )
2830class TrainTokenizerTest (unittest .TestCase ):
2931 """Tests for train_tokenizer.py using data from Parquet files"""
3032
@@ -69,6 +71,7 @@ def test_detokenize(self):
6971 self .assertEqual (np .asarray (self .source_tokenizer .decode (tokens )), np .asarray (self .test_tokenizer .decode (tokens )))
7072
7173
74+ @unittest .skipIf (is_decoupled (), "Bypassed in offline decoupled runs (no GCS/internet)" )
7275class TikTokenTest (unittest .TestCase ):
7376 """Tests for TikToken"""
7477
@@ -96,6 +99,7 @@ def test_detokenize(self):
9699 self .assertEqual (np .asarray (self .source_tokenizer .decode (tokens )), np .asarray (text ))
97100
98101
102+ @unittest .skipIf (is_decoupled (), "Bypassed in offline decoupled runs (no GCS/internet)" )
99103class HFTokenizerTest (unittest .TestCase ):
100104 """Tests for HFTokenizer"""
101105
You can’t perform that action at this time.
0 commit comments