boris commited on
Commit
23389f6
1 Parent(s): f5dba1e

fix: push_to_hub deprecated

Browse files

issues recloning the repo, logic to be updated or push from wandb to HF

Files changed (1) hide show
  1. tools/train/train.py +0 -17
tools/train/train.py CHANGED
@@ -267,13 +267,6 @@ class TrainingArguments:
267
  },
268
  )
269
 
270
- push_to_hub: bool = field(
271
- default=False,
272
- metadata={
273
- "help": "Whether or not to upload the trained model to the model hub after training."
274
- },
275
- )
276
-
277
  resume_from_checkpoint: Optional[str] = field(
278
  default=None,
279
  metadata={"help": "Reference to a wandb artifact for resuming training."},
@@ -821,16 +814,6 @@ def main():
821
 
822
  wandb.run.log_artifact(artifact)
823
 
824
- # save to the hub
825
- if training_args.push_to_hub:
826
- model.save_pretrained(
827
- training_args.output_dir,
828
- params=params,
829
- push_to_hub=training_args.push_to_hub,
830
- commit_message=f"Saving weights and logs at step {unreplicate(state.step)+1}",
831
- temp_dir=True, # avoid issues with being in a repository
832
- )
833
-
834
  # init variables
835
  last_time = time.perf_counter()
836
  train_metrics = None
 
267
  },
268
  )
269
 
 
 
 
 
 
 
 
270
  resume_from_checkpoint: Optional[str] = field(
271
  default=None,
272
  metadata={"help": "Reference to a wandb artifact for resuming training."},
 
814
 
815
  wandb.run.log_artifact(artifact)
816
 
 
 
 
 
 
 
 
 
 
 
817
  # init variables
818
  last_time = time.perf_counter()
819
  train_metrics = None