Remove static pretrained maps from the library's internals (#29112)
* [test_all] Remove static pretrained maps from the library's internals * Deprecate archive maps instead of removing them * Revert init changes * [test_all] Deprecate instead of removing * [test_all] PVT v2 support * [test_all] Tests should all pass * [test_all] Style * Address review comments * Update src/transformers/models/deprecated/_archive_maps.py Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com> * Update src/transformers/models/deprecated/_archive_maps.py Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com> * [test_all] trigger tests * [test_all] LLAVA * [test_all] Bad rebase --------- Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
This commit is contained in:
@@ -29,7 +29,6 @@ if is_tf_available():
|
||||
import tensorflow as tf
|
||||
|
||||
from transformers.models.xglm.modeling_tf_xglm import (
|
||||
TF_XGLM_PRETRAINED_MODEL_ARCHIVE_LIST,
|
||||
TFXGLMForCausalLM,
|
||||
TFXGLMModel,
|
||||
)
|
||||
@@ -161,9 +160,9 @@ class TFXGLMModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.TestCase
|
||||
|
||||
@slow
|
||||
def test_model_from_pretrained(self):
|
||||
for model_name in TF_XGLM_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
|
||||
model = TFXGLMModel.from_pretrained(model_name)
|
||||
self.assertIsNotNone(model)
|
||||
model_name = "facebook/xglm-564M"
|
||||
model = TFXGLMModel.from_pretrained(model_name)
|
||||
self.assertIsNotNone(model)
|
||||
|
||||
@unittest.skip(reason="Currently, model embeddings are going to undergo a major refactor.")
|
||||
def test_resize_token_embeddings(self):
|
||||
|
||||
@@ -36,7 +36,7 @@ from ...test_pipeline_mixin import PipelineTesterMixin
|
||||
if is_torch_available():
|
||||
import torch
|
||||
|
||||
from transformers import XGLM_PRETRAINED_MODEL_ARCHIVE_LIST, XGLMForCausalLM, XGLMModel, XGLMTokenizer
|
||||
from transformers import XGLMForCausalLM, XGLMModel, XGLMTokenizer
|
||||
|
||||
|
||||
class XGLMModelTester:
|
||||
@@ -349,9 +349,9 @@ class XGLMModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMixin
|
||||
|
||||
@slow
|
||||
def test_model_from_pretrained(self):
|
||||
for model_name in XGLM_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
|
||||
model = XGLMModel.from_pretrained(model_name)
|
||||
self.assertIsNotNone(model)
|
||||
model_name = "facebook/xglm-564M"
|
||||
model = XGLMModel.from_pretrained(model_name)
|
||||
self.assertIsNotNone(model)
|
||||
|
||||
@unittest.skip("Does not work on the tiny model as we keep hitting edge cases.")
|
||||
def test_model_parallelism(self):
|
||||
|
||||
Reference in New Issue
Block a user