0

I'm using HuggingFace's Seq2SeqTrainer and I successfully trained a model. When I try to execute (where trainer is an instance of Seq2SeqTrainer):

trainer.push_to_hub()

It returns error:

AttributeError: 'Seq2SeqTrainer' object has no attribute 'push_in_progress'

Trainer Code:

trainer = Seq2SeqTrainer(
    model=model,
    args=training_args,
    train_dataset=tokenized["train"],
    eval_dataset=tokenized["test"],
    tokenizer=tokenizer,
    data_collator=data_collator,
    compute_metrics=compute_metrics,
)
trainer.train()
trainer.push_to_hub()

How can I resolve this problem?

Other codes can be found in my other question.

Raptor
  • 53,206
  • 45
  • 230
  • 366

1 Answers1

0

To solve the problem, I have to add the following line before the push_to_hub() line:

model.push_in_progress = None

Using huggingface_hub version 0.12.0

Raptor
  • 53,206
  • 45
  • 230
  • 366