mattbitzesty commited on
Commit
db8ffc0
·
unverified ·
1 Parent(s): eaf6535

feat(hf_job): allow mounted data/registry paths via env vars

Browse files

HF_DATA_PATH and HF_REGISTRY_PATH override repo defaults so the job
can run with read-only source + pre-mounted dataset/registry volumes.

Files changed (1) hide show
  1. 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
- data_path = REPO_ROOT / "data" / "empirical_dataset_v1.jsonl"
24
- registry_path = REPO_ROOT / "src" / "pino" / "registry.db"
 
 
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.