feat(hf_job): allow mounted data/registry paths via env vars
Browse filesHF_DATA_PATH and HF_REGISTRY_PATH override repo defaults so the job
can run with read-only source + pre-mounted dataset/registry volumes.
- scripts/hf_train_job.py +4 -2
scripts/hf_train_job.py
CHANGED
|
@@ -20,8 +20,10 @@ from pino.train import main as train_main
|
|
| 20 |
def hf_train_5epoch() -> None:
|
| 21 |
"""Run a controlled 5-epoch training pass and push artifacts to the Hub."""
|
| 22 |
token = os.environ.get("HF_TOKEN")
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
| 25 |
|
| 26 |
if not data_path.exists() and token:
|
| 27 |
# Download the dataset from the canonical dataset repository.
|
|
|
|
| 20 |
def hf_train_5epoch() -> None:
|
| 21 |
"""Run a controlled 5-epoch training pass and push artifacts to the Hub."""
|
| 22 |
token = os.environ.get("HF_TOKEN")
|
| 23 |
+
|
| 24 |
+
# Allow mounted data/registry paths to override the repo defaults.
|
| 25 |
+
data_path = Path(os.environ.get("HF_DATA_PATH", REPO_ROOT / "data" / "empirical_dataset_v1.jsonl"))
|
| 26 |
+
registry_path = Path(os.environ.get("HF_REGISTRY_PATH", REPO_ROOT / "src" / "pino" / "registry.db"))
|
| 27 |
|
| 28 |
if not data_path.exists() and token:
|
| 29 |
# Download the dataset from the canonical dataset repository.
|