[Trainer] Undo #29896 (#30129)

* Undo

* Use tokenizer

* Undo data collator
This commit is contained in:
NielsRogge
2024-04-09 12:55:42 +02:00
committed by GitHub
parent ba1b24e07b
commit e9c23fa056
20 changed files with 24 additions and 41 deletions

View File

@@ -322,7 +322,7 @@ At this point, only three steps remain:
... data_collator=data_collator,
... train_dataset=food["train"],
... eval_dataset=food["test"],
... image_processor=image_processor,
... tokenizer=image_processor,
... compute_metrics=compute_metrics,
... )
@@ -418,7 +418,7 @@ and use the [PushToHubCallback](../main_classes/keras_callbacks#transformers.Pus
>>> metric_callback = KerasMetricCallback(metric_fn=compute_metrics, eval_dataset=tf_eval_dataset)
>>> push_to_hub_callback = PushToHubCallback(
... output_dir="food_classifier",
... image_processor=image_processor,
... tokenizer=image_processor,
... save_strategy="no",
... )
>>> callbacks = [metric_callback, push_to_hub_callback]