Update all references to canonical models (#29001)
* Script & Manual edition * Update
This commit is contained in:
@@ -154,6 +154,6 @@ class FlaxRobertaModelTest(FlaxModelTesterMixin, unittest.TestCase):
|
||||
@slow
|
||||
def test_model_from_pretrained(self):
|
||||
for model_class_name in self.all_model_classes:
|
||||
model = model_class_name.from_pretrained("roberta-base", from_pt=True)
|
||||
model = model_class_name.from_pretrained("FacebookAI/roberta-base", from_pt=True)
|
||||
outputs = model(np.ones((1, 1)))
|
||||
self.assertIsNotNone(outputs)
|
||||
|
||||
@@ -527,7 +527,7 @@ class RobertaModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMi
|
||||
class RobertaModelIntegrationTest(TestCasePlus):
|
||||
@slow
|
||||
def test_inference_masked_lm(self):
|
||||
model = RobertaForMaskedLM.from_pretrained("roberta-base")
|
||||
model = RobertaForMaskedLM.from_pretrained("FacebookAI/roberta-base")
|
||||
|
||||
input_ids = torch.tensor([[0, 31414, 232, 328, 740, 1140, 12695, 69, 46078, 1588, 2]])
|
||||
with torch.no_grad():
|
||||
@@ -547,7 +547,7 @@ class RobertaModelIntegrationTest(TestCasePlus):
|
||||
|
||||
@slow
|
||||
def test_inference_no_head(self):
|
||||
model = RobertaModel.from_pretrained("roberta-base")
|
||||
model = RobertaModel.from_pretrained("FacebookAI/roberta-base")
|
||||
|
||||
input_ids = torch.tensor([[0, 31414, 232, 328, 740, 1140, 12695, 69, 46078, 1588, 2]])
|
||||
with torch.no_grad():
|
||||
@@ -565,7 +565,7 @@ class RobertaModelIntegrationTest(TestCasePlus):
|
||||
|
||||
@slow
|
||||
def test_inference_classification_head(self):
|
||||
model = RobertaForSequenceClassification.from_pretrained("roberta-large-mnli")
|
||||
model = RobertaForSequenceClassification.from_pretrained("FacebookAI/roberta-large-mnli")
|
||||
|
||||
input_ids = torch.tensor([[0, 31414, 232, 328, 740, 1140, 12695, 69, 46078, 1588, 2]])
|
||||
with torch.no_grad():
|
||||
|
||||
@@ -666,7 +666,7 @@ class TFRobertaModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.TestC
|
||||
class TFRobertaModelIntegrationTest(unittest.TestCase):
|
||||
@slow
|
||||
def test_inference_masked_lm(self):
|
||||
model = TFRobertaForMaskedLM.from_pretrained("roberta-base")
|
||||
model = TFRobertaForMaskedLM.from_pretrained("FacebookAI/roberta-base")
|
||||
|
||||
input_ids = tf.constant([[0, 31414, 232, 328, 740, 1140, 12695, 69, 46078, 1588, 2]])
|
||||
output = model(input_ids)[0]
|
||||
@@ -680,7 +680,7 @@ class TFRobertaModelIntegrationTest(unittest.TestCase):
|
||||
|
||||
@slow
|
||||
def test_inference_no_head(self):
|
||||
model = TFRobertaModel.from_pretrained("roberta-base")
|
||||
model = TFRobertaModel.from_pretrained("FacebookAI/roberta-base")
|
||||
|
||||
input_ids = tf.constant([[0, 31414, 232, 328, 740, 1140, 12695, 69, 46078, 1588, 2]])
|
||||
output = model(input_ids)[0]
|
||||
@@ -692,7 +692,7 @@ class TFRobertaModelIntegrationTest(unittest.TestCase):
|
||||
|
||||
@slow
|
||||
def test_inference_classification_head(self):
|
||||
model = TFRobertaForSequenceClassification.from_pretrained("roberta-large-mnli")
|
||||
model = TFRobertaForSequenceClassification.from_pretrained("FacebookAI/roberta-large-mnli")
|
||||
|
||||
input_ids = tf.constant([[0, 31414, 232, 328, 740, 1140, 12695, 69, 46078, 1588, 2]])
|
||||
output = model(input_ids)[0]
|
||||
|
||||
@@ -105,7 +105,7 @@ class RobertaTokenizationTest(TokenizerTesterMixin, unittest.TestCase):
|
||||
|
||||
@slow
|
||||
def test_sequence_builders(self):
|
||||
tokenizer = self.tokenizer_class.from_pretrained("roberta-base")
|
||||
tokenizer = self.tokenizer_class.from_pretrained("FacebookAI/roberta-base")
|
||||
|
||||
text = tokenizer.encode("sequence builders", add_special_tokens=False)
|
||||
text_2 = tokenizer.encode("multi-sequence build", add_special_tokens=False)
|
||||
|
||||
Reference in New Issue
Block a user