Fix `RealmModelIntegrationTest.test_inference_open_qa` (#21136)

fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar 2023-01-16 15:09:52 +01:00 committed by GitHub
parent a5327c6a9a
commit a45914193a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 3 deletions

View File

@ -480,15 +480,12 @@ class RealmModelIntegrationTest(unittest.TestCase):
def test_inference_open_qa(self):
from transformers.models.realm.retrieval_realm import RealmRetriever
config = RealmConfig()
tokenizer = RealmTokenizer.from_pretrained("google/realm-orqa-nq-openqa")
retriever = RealmRetriever.from_pretrained("google/realm-orqa-nq-openqa")
model = RealmForOpenQA.from_pretrained(
"google/realm-orqa-nq-openqa",
retriever=retriever,
config=config,
)
question = "Who is the pioneer in modern computer science?"