gonzalolinares commited on
Commit
95f1e85
·
verified ·
1 Parent(s): 332a987

fix Trackio crash: push at end only

Browse files
Files changed (1) hide show
  1. train_sft.py +6 -6
train_sft.py CHANGED
@@ -45,18 +45,18 @@ def main() -> None:
45
  logging_steps=5,
46
  eval_strategy="steps",
47
  eval_steps=20,
48
- save_steps=50,
 
49
  max_length=1024,
50
  bf16=True,
51
- push_to_hub=True,
52
  hub_model_id=HUB_MODEL_ID,
53
- report_to="trackio",
54
- project="cpp-compiler-rl",
55
- run_name="sft-qwen25-1.5b",
56
  ),
57
  )
58
  trainer.train()
59
- trainer.push_to_hub()
 
60
  print(f"Pushed to {HUB_MODEL_ID}")
61
 
62
 
 
45
  logging_steps=5,
46
  eval_strategy="steps",
47
  eval_steps=20,
48
+ save_strategy="epoch",
49
+ save_total_limit=1,
50
  max_length=1024,
51
  bf16=True,
52
+ push_to_hub=False, # push once at end (avoid Trackio parquet bug mid-save)
53
  hub_model_id=HUB_MODEL_ID,
54
+ report_to="none",
 
 
55
  ),
56
  )
57
  trainer.train()
58
+ trainer.model.push_to_hub(HUB_MODEL_ID, private=False)
59
+ trainer.processing_class.push_to_hub(HUB_MODEL_ID, private=False)
60
  print(f"Pushed to {HUB_MODEL_ID}")
61
 
62