Security: remove hardcoded tokens from code/build_dpo_dataset.py, use env/arg only
Browse files501 unmodified lines502503504505506507508501 unmodified linesif "--push_to_hf" in sys.argv:token = HF_TOKEN or os.environ.get("HF_TOKEN")if not token:token = ''.join(['hf_','ssyCVhuny','XxjGdqKp','VLPpkmWK','FrrMOIFbg'])print(f"\n☁️ Pushing DPO Dataset to Hugging Face Hub ({HF_DATA_REPO})...")from huggingface_hub import HfApiapi = HfApi(token=token)501 unmodified lines502503504505506507508501 unmodified linesif "--push_to_hf" in sys.argv:token = HF_TOKEN or os.environ.get("HF_TOKEN")if not token:raise ValueError("HF_TOKEN env var is not set! Export HF_TOKEN before --push_to_hf. Never hardcode tokens.")print(f"\n☁️ Pushing DPO Dataset to Hugging Face Hub ({HF_DATA_REPO})...")from huggingface_hub import HfApiapi = HfApi(token=token)
code/build_dpo_dataset.py+1-1