Cion-lab commited on
Commit
7a667d0
·
verified ·
1 Parent(s): f7ea5a1

train: train_ounce100m -- hubckpt.ensure_repo writes LFS attributes before the first checkpoint push (found by P1)

Browse files
Files changed (1) hide show
  1. train/train_ounce100m.py +4 -4
train/train_ounce100m.py CHANGED
@@ -243,10 +243,10 @@ def main():
243
  ounce100m_credentials.install()
244
  from huggingface_hub import HfApi
245
  api = HfApi()
246
- # Create-if-absent: an upload to a repo nobody made yet is a failure that lands 10 minutes into
247
- # the first checkpoint, on a GPU session that is being billed while it waits.
248
- api.create_repo(repo_id=args.hub_repo, repo_type=args.hub_repo_type, exist_ok=True,
249
- token=os.environ.get("HF_TOKEN"))
250
  say(f"checkpoint hub target {args.hub_repo} (prune={args.prune}, every {ckpt_every} steps)")
251
 
252
  tacc = TrainingArguments(
 
243
  ounce100m_credentials.install()
244
  from huggingface_hub import HfApi
245
  api = HfApi()
246
+ # create-if-absent AND LFS patterns: see hubckpt.ensure_repo for the failure this prevents
247
+ say("ckpt repo:", json.dumps(hubckpt.ensure_repo(args.hub_repo, api,
248
+ os.environ.get("HF_TOKEN"),
249
+ args.hub_repo_type)))
250
  say(f"checkpoint hub target {args.hub_repo} (prune={args.prune}, every {ckpt_every} steps)")
251
 
252
  tacc = TrainingArguments(