mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 10:12:23 +06:00
Bugfix: WandbCallback uploads initial model checkpoint (#30897)
* fix wandb always uploading initial model * Update comment. * Optionally log initial model * Revert "Optionally log initial model" This reverts commit 9602cc1fad3feaf218f82a7339a194d3d2fbb946.
This commit is contained in:
parent
6d3d5b1039
commit
6657fb5fed
@ -797,7 +797,7 @@ class WandbCallback(TrainerCallback):
|
||||
except AttributeError:
|
||||
logger.info("Could not log the number of model parameters in Weights & Biases.")
|
||||
|
||||
# log the initial model and architecture to an artifact
|
||||
# log the initial model architecture to an artifact
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
model_name = (
|
||||
f"model-{self._wandb.run.id}"
|
||||
@ -813,7 +813,6 @@ class WandbCallback(TrainerCallback):
|
||||
"initial_model": True,
|
||||
},
|
||||
)
|
||||
model.save_pretrained(temp_dir)
|
||||
# add the architecture to a separate text file
|
||||
save_model_architecture_to_file(model, temp_dir)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user