Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files271 unmodified lines27227327427527627727827928012 unmodified lines29329429529629729821 unmodified lines320321322323324325326327328271 unmodified lines# ── Easy ──────────────────────────────────────────────────────────────if task_id == "easy":if label_correct:return 1.0, f"✅ Correct label '{action.label}'! Full marks."else:return 0.0, (f"❌ Wrong label '{action.label}'. "f"Correct answer: '{issue['label']}'.")12 unmodified linesparts.append("✅ team correct (+0.5)")else:parts.append(f"❌ team wrong (got '{action.team}', expected '{issue['team']}')")return round(reward, 4), " | ".join(parts)# ── Hard ──────────────────────────────────────────────────────────────21 unmodified linesparts.append(f"✅ fix suggestion (+{partial:.2f})")else:parts.append("❌ fix suggestion (no relevant keywords)")return round(reward, 4), " | ".join(parts)return 0.0, f"Unknown task_id '{task_id}'"# ── Environment ───────────────────────────────────────────────────────────────271 unmodified lines27227327427527627727827928012 unmodified lines29329429529629729829930021 unmodified lines322323324325326327328329330331332271 unmodified lines# ── Easy ──────────────────────────────────────────────────────────────if task_id == "easy":if label_correct:return 0.99, f"✅ Correct label '{action.label}'! Full marks."else:return 0.01, (f"❌ Wrong label '{action.label}'. "f"Correct answer: '{issue['label']}'.")12 unmodified linesparts.append("✅ team correct (+0.5)")else:parts.append(f"❌ team wrong (got '{action.team}', expected '{issue['team']}')")reward = max(0.01, min(0.99, reward))return round(reward, 4), " | ".join(parts)# ── Hard ──────────────────────────────────────────────────────────────21 unmodified linesparts.append(f"✅ fix suggestion (+{partial:.2f})")else:parts.append("❌ fix suggestion (no relevant keywords)")reward = max(0.01, min(0.99, reward))return round(reward, 4), " | ".join(parts)return 0.01, f"Unknown task_id '{task_id}'"# ── Environment ───────────────────────────────────────────────────────────────
server/github_issue_triage_environment.py+7-3