File size: 1,878 Bytes
6da8440 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | """Uploads the built dataset AND the training code to one private HF dataset repo.
The RunPod/Kaggle machines then only need your HF token to get everything:
hf download <repo> --repo-type dataset --local-dir bloxy
HF_TOKEN=... python scripts/publish_hf.py --repo YOURNAME/bloxy-data-v1
"""
from __future__ import annotations
import argparse
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
CARD = """---
license: other
private: true
tags: [roblox, luau, building, gemma, bloxy]
---
# Bloxy v1 training data
Chat-format training set for **Bloxy**, a Gemma 4 fine-tune that builds and scripts in
Roblox Studio. Built by `scripts/build_dataset.py` from 19 public datasets plus
procedurally generated Roblox builds. See `stats.json` for the mix and
`masked_samples.md` for what the model is trained on.
Each source keeps its own license; check them before any commercial use.
"""
def main():
ap = argparse.ArgumentParser()
ap.add_argument("--repo", required=True)
ap.add_argument("--out", default=str(ROOT / "out"))
args = ap.parse_args()
from huggingface_hub import HfApi
api = HfApi()
api.create_repo(args.repo, repo_type="dataset", private=True, exist_ok=True)
(Path(args.out) / "README.md").write_text(CARD)
api.upload_folder(
repo_id=args.repo, repo_type="dataset", folder_path=args.out,
allow_patterns=["*.jsonl", "*.jsonl.gz", "*.json", "*.md", "*.txt"],
commit_message="Update Bloxy dataset",
)
api.upload_folder(
repo_id=args.repo, repo_type="dataset", folder_path=str(ROOT), path_in_repo="code",
allow_patterns=["bloxy_data/*.py", "scripts/*.py", "runpod/*", "eval/*", "requirements*.txt"],
commit_message="Update Bloxy training code",
)
print(f"https://huggingface.co/datasets/{args.repo}")
if __name__ == "__main__":
main()
|