train: train_ounce100m -- hubckpt.ensure_repo writes LFS attributes before the first checkpoint push (found by P1)
Browse files- 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 |
-
#
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 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(
|