MCPcopy Create free account
hub / github.com/AI-Hypercomputer/maxtext / setUpClass

Method setUpClass

tests/tokenizer_test.py:113–125  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

111
112 @classmethod
113 def setUpClass(cls):
114 source = "gs://maxtext-gemma/huggingface/gemma2-2b"
115 destination = os.path.join(MAXTEXT_ASSETS_ROOT, "")
116 subprocess.run(
117 ["gcloud", "storage", "cp", "-R", source, destination],
118 check=True,
119 )
120 cls.hf_tokenizer = _input_pipeline_utils.get_tokenizer(
121 os.path.join(MAXTEXT_ASSETS_ROOT, "gemma2-2b"), "huggingface", add_bos=False, add_eos=False
122 )
123 cls.sp_tokenizer = _input_pipeline_utils.get_tokenizer(
124 os.path.join(MAXTEXT_ASSETS_ROOT, "tokenizer.gemma"), "sentencepiece", add_bos=False, add_eos=False
125 )
126
127 @pytest.mark.tpu_only
128 def test_tokenize(self):

Callers

nothing calls this directly

Calls 2

get_tokenizerMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected