Skip to content

Commit

Permalink
fix(wandb): pass fake dataset to avoid exception in trainer (see #34455
Browse files Browse the repository at this point in the history
…) (#34720)
  • Loading branch information
CezaPasc authored Nov 15, 2024
1 parent f5dbfab commit 7b3d615
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/integrations/integration_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ def on_train_end(self, args, state, control, model=None, tokenizer=None, **kwarg
if self._log_model.is_enabled and self._initialized and state.is_world_process_zero:
from ..trainer import Trainer

fake_trainer = Trainer(args=args, model=model, processing_class=tokenizer)
fake_trainer = Trainer(args=args, model=model, processing_class=tokenizer, eval_dataset=["fake"])
with tempfile.TemporaryDirectory() as temp_dir:
fake_trainer.save_model(temp_dir)
metadata = (
Expand Down

0 comments on commit 7b3d615

Please sign in to comment.