mahir-m01 commited on
Commit ·
ef522a8
1
Parent(s): ead6cb5
chore(hf): add publish_v6_to_dataset.sh for arm-gym-pkg sync
Browse files- hf/publish_v6_to_dataset.sh +22 -0
hf/publish_v6_to_dataset.sh
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Upload hf/v6_train.py to the Jobs dataset. Requires HF_TOKEN (or huggingface-cli login).
|
| 3 |
+
set -euo pipefail
|
| 4 |
+
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
| 5 |
+
cd "$ROOT"
|
| 6 |
+
: "${HF_TOKEN:?Set HF_TOKEN (read-only is enough for upload if permitted)}"
|
| 7 |
+
export HF_TOKEN
|
| 8 |
+
uv run --with huggingface_hub python <<'PY'
|
| 9 |
+
from huggingface_hub import HfApi
|
| 10 |
+
from pathlib import Path
|
| 11 |
+
import os
|
| 12 |
+
p = Path("hf/v6_train.py")
|
| 13 |
+
api = HfApi(token=os.environ["HF_TOKEN"])
|
| 14 |
+
api.upload_file(
|
| 15 |
+
path_or_fileobj=str(p),
|
| 16 |
+
path_in_repo="v6_train.py",
|
| 17 |
+
repo_id="ZDC-M01/arm-gym-pkg",
|
| 18 |
+
repo_type="dataset",
|
| 19 |
+
commit_message="chore: sync v6_train.py from arm-gym repo (Jobs curl target)",
|
| 20 |
+
)
|
| 21 |
+
print("OK: ZDC-M01/arm-gym-pkg path=v6_train.py")
|
| 22 |
+
PY
|