Fix some TF GPT-J CI testings (#16454)
* Fix for test_mixed_precision * Fix test_saved_model_creation by using shape_list instead of shape * skit test_model_from_pretrained on GPU for now to avoid GPU OOM * skip test_gptj_sample_max_time for now Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -345,6 +345,10 @@ class TFGPTJModelTest(TFModelTesterMixin, TFCoreModelTesterMixin, unittest.TestC
|
||||
assert name is None
|
||||
|
||||
@slow
|
||||
@unittest.skipIf(
|
||||
not is_tf_available() or len(tf.config.list_physical_devices("GPU")) > 0,
|
||||
"skip testing on GPU for now to avoid GPU OOM.",
|
||||
)
|
||||
def test_model_from_pretrained(self):
|
||||
model = TFGPTJModel.from_pretrained("EleutherAI/gpt-j-6B", from_pt=True)
|
||||
self.assertIsNotNone(model)
|
||||
@@ -395,6 +399,7 @@ class TFGPTJModelLanguageGenerationTest(unittest.TestCase):
|
||||
) # token_type_ids should change output
|
||||
|
||||
@slow
|
||||
@unittest.skip(reason="TF generate currently has no time-based stopping criteria")
|
||||
def test_gptj_sample_max_time(self):
|
||||
tokenizer = AutoTokenizer.from_pretrained("anton-l/gpt-j-tiny-random")
|
||||
model = TFGPTJForCausalLM.from_pretrained("anton-l/gpt-j-tiny-random", from_pt=True)
|
||||
|
||||
Reference in New Issue
Block a user