1 将 pandas 导入为 pd 2个进口手电筒 ----> 3 from transformers import GPT2Tokenizer, GPT2ForQuestionAnswering, AdamW 4 从变形金刚导入 default_data_collator 5 从 torch.utils.data 导入 DataLoader
import pandas as pd
import torch
from transformers import GPT2Tokenizer, GPT2ForQuestionAnswering, AdamW
from transformers import default_data_collator
from torch.utils.data import DataLoader
from transformers import datasets
from transformers import TriviaQAProcessor, set_seed
from transformers import TrainingArguments, Trainer