OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

can not import tftrainer from trnasformers

  • Thread starter Thread starter Osama Anmar
  • Start date Start date
O

Osama Anmar

Guest
i try to train gpt2 model on my own data

from transformers import GPT2Tokenizer, GPT2LMHeadModel from transformers import TextDataset, DataCollatorForLanguageModeling from transformers import TFTrainer, TFTrainingArguments

but i have error cannot import name 'TFTrainer' from 'transformers'

i try to change the version of transformers and also i have same problem

and also try from tftrainer import TrainArgument, Trainer from transformers.trainer_tf import TFTrainer
<p>i try to train gpt2 model on my own data</p>
<p>from transformers import GPT2Tokenizer, GPT2LMHeadModel
from transformers import TextDataset, DataCollatorForLanguageModeling
from transformers import TFTrainer, TFTrainingArguments</p>
<p>but i have error cannot import name 'TFTrainer' from 'transformers'</p>
<p>i try to change the version of transformers and also i have same problem</p>
<p>and also try
from tftrainer import TrainArgument, Trainer
from transformers.trainer_tf import TFTrainer</p>
 

Latest posts

G
Replies
0
Views
1
Gamal Othman
G
Top