passagereptile455 commited on
Commit
0e87ee9
·
verified ·
1 Parent(s): 0e51fb8

Fix auth: remove login(), use HfApi(token=)

Browse files
Files changed (1) hide show
  1. train_humaneval_clean.py +3 -3
train_humaneval_clean.py CHANGED
@@ -26,14 +26,14 @@ print("=" * 60)
26
  print("PHASE 0: Authentication")
27
  print("=" * 60)
28
 
29
- from huggingface_hub import login, HfApi
30
 
31
  HF_TOKEN = os.environ.get("HF_TOKEN")
32
  if not HF_TOKEN:
33
  raise ValueError("HF_TOKEN environment variable required")
34
 
35
- login(token=HF_TOKEN)
36
- api = HfApi()
37
  user_info = api.whoami()
38
  print(f"Authenticated as: {user_info['name']}")
39
 
 
26
  print("PHASE 0: Authentication")
27
  print("=" * 60)
28
 
29
+ from huggingface_hub import HfApi
30
 
31
  HF_TOKEN = os.environ.get("HF_TOKEN")
32
  if not HF_TOKEN:
33
  raise ValueError("HF_TOKEN environment variable required")
34
 
35
+ # Removed login() - using HfApi(token=) instead
36
+ api = HfApi(token=HF_TOKEN)
37
  user_info = api.whoami()
38
  print(f"Authenticated as: {user_info['name']}")
39