PunitRaveendran commited on
Commit
36beb20
·
verified ·
1 Parent(s): 04db364

Update inference.py

Browse files
Files changed (1) hide show
  1. inference.py +6 -6
inference.py CHANGED
@@ -412,12 +412,12 @@ def run_inference(task_id: int, model_name: str, api_base: str, api_key: str) ->
412
 
413
 
414
  def main():
415
- api_key = os.getenv("HF_TOKEN") or os.getenv("API_KEY") or "dummy-token"
416
- api_base = os.getenv("API_BASE_URL") or "https://router.huggingface.co/v1"
417
- model_name = os.getenv("MODEL_NAME") or "Qwen/Qwen2.5-72B-Instruct"
418
 
419
- print(f"[DEBUG] Starting ATC inference with model: {model_name}")
420
- print(f"[DEBUG] API base: {api_base}")
421
 
422
  total_score = 0.0
423
  results = []
@@ -425,7 +425,7 @@ def main():
425
  for task_id in [1, 2, 3]:
426
  print(f"\n[DEBUG] ===== Running Task {task_id} =====")
427
  try:
428
- score, reward, log = run_inference(task_id, model_name, api_base, api_key)
429
  results.append({"task_id": task_id, "score": score, "reward": reward})
430
  total_score += score
431
  except Exception as e:
 
412
 
413
 
414
  def main():
415
+ API_BASE_URL = os.getenv("API_BASE_URL", "https://router.huggingface.co/v1")
416
+ MODEL_NAME = os.getenv("MODEL_NAME", "Qwen/Qwen2.5-72B-Instruct")
417
+ HF_TOKEN = os.getenv("HF_TOKEN")
418
 
419
+ print(f"[DEBUG] Starting ATC inference with model: {MODEL_NAME}")
420
+ print(f"[DEBUG] API base: {API_BASE_URL}")
421
 
422
  total_score = 0.0
423
  results = []
 
425
  for task_id in [1, 2, 3]:
426
  print(f"\n[DEBUG] ===== Running Task {task_id} =====")
427
  try:
428
+ score, reward, log = run_inference(task_id, MODEL_NAME, API_BASE_URL, HF_TOKEN)
429
  results.append({"task_id": task_id, "score": score, "reward": reward})
430
  total_score += score
431
  except Exception as e: