root Claude Opus 4.6 commited on
Commit ·
d76cb7d
1
Parent(s): d3b77e2
fix: remove circleguardbench git dependency to fix build
Browse filesThe circleguardbench git dependency was causing build failures.
Removed it from requirements.txt and made imports lazy in submit.py.
The leaderboard display works without the package; only submission
processing requires it.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- requirements.txt +1 -1
- src/submission/submit.py +11 -3
requirements.txt
CHANGED
|
@@ -6,4 +6,4 @@ apscheduler>=3.10.0
|
|
| 6 |
python-dotenv>=1.0.0
|
| 7 |
plotly>=5.18.0
|
| 8 |
pydantic==2.10.6
|
| 9 |
-
|
|
|
|
| 6 |
python-dotenv>=1.0.0
|
| 7 |
plotly>=5.18.0
|
| 8 |
pydantic==2.10.6
|
| 9 |
+
scikit-learn>=1.0.0
|
src/submission/submit.py
CHANGED
|
@@ -18,9 +18,14 @@ import subprocess
|
|
| 18 |
from src.display.formatting import styled_error, styled_message
|
| 19 |
from src.envs import RESULTS_DATASET_ID, TOKEN, REPO_ID
|
| 20 |
from src.leaderboard.processor import process_jsonl_submission
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
from circleguardbench.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
|
| 26 |
def validate_submission(file_path: str) -> Tuple[bool, str]:
|
|
@@ -124,6 +129,9 @@ def process_submission(file_path: str, metadata: Dict, version="v0") -> str:
|
|
| 124 |
"""
|
| 125 |
Process a submission to the GuardBench leaderboard.
|
| 126 |
"""
|
|
|
|
|
|
|
|
|
|
| 127 |
try:
|
| 128 |
# Validate submission
|
| 129 |
is_valid, validation_message = validate_submission(file_path)
|
|
|
|
| 18 |
from src.display.formatting import styled_error, styled_message
|
| 19 |
from src.envs import RESULTS_DATASET_ID, TOKEN, REPO_ID
|
| 20 |
from src.leaderboard.processor import process_jsonl_submission
|
| 21 |
+
|
| 22 |
+
try:
|
| 23 |
+
from circleguardbench.evaluator import Evaluator
|
| 24 |
+
from circleguardbench.context import GuardbenchContext
|
| 25 |
+
from circleguardbench.models_config import ModelType
|
| 26 |
+
GUARDBENCH_AVAILABLE = True
|
| 27 |
+
except ImportError:
|
| 28 |
+
GUARDBENCH_AVAILABLE = False
|
| 29 |
|
| 30 |
|
| 31 |
def validate_submission(file_path: str) -> Tuple[bool, str]:
|
|
|
|
| 129 |
"""
|
| 130 |
Process a submission to the GuardBench leaderboard.
|
| 131 |
"""
|
| 132 |
+
if not GUARDBENCH_AVAILABLE:
|
| 133 |
+
return styled_error("circleguardbench package is not installed. Submission processing is unavailable.")
|
| 134 |
+
|
| 135 |
try:
|
| 136 |
# Validate submission
|
| 137 |
is_valid, validation_message = validate_submission(file_path)
|