change dataset name
Browse files- src/envs.py +2 -2
- src/submission/submit.py +4 -4
src/envs.py
CHANGED
|
@@ -7,13 +7,13 @@ load_dotenv()
|
|
| 7 |
|
| 8 |
# Hugging Face configuration
|
| 9 |
TOKEN = os.environ.get("HF_TOKEN") # A read/write token for your org
|
| 10 |
-
OWNER = os.environ.get("OWNER", "
|
| 11 |
SUBMITTER_TOKEN = os.environ.get("SUBMITTER_TOKEN")
|
| 12 |
ADMIN_USERNAME = os.environ.get("ADMIN_USERNAME")
|
| 13 |
ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD")
|
| 14 |
|
| 15 |
# Repository IDs
|
| 16 |
-
REPO_ID = f"{OWNER}/
|
| 17 |
RESULTS_DATASET_ID = os.environ.get("RESULTS_DATASET_ID", f"{OWNER}/guardbench-results")
|
| 18 |
|
| 19 |
# Cache paths
|
|
|
|
| 7 |
|
| 8 |
# Hugging Face configuration
|
| 9 |
TOKEN = os.environ.get("HF_TOKEN") # A read/write token for your org
|
| 10 |
+
OWNER = os.environ.get("OWNER", "whitecircle-ai") # Change to your org
|
| 11 |
SUBMITTER_TOKEN = os.environ.get("SUBMITTER_TOKEN")
|
| 12 |
ADMIN_USERNAME = os.environ.get("ADMIN_USERNAME")
|
| 13 |
ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD")
|
| 14 |
|
| 15 |
# Repository IDs
|
| 16 |
+
REPO_ID = f"{OWNER}/circle-guard-bench"
|
| 17 |
RESULTS_DATASET_ID = os.environ.get("RESULTS_DATASET_ID", f"{OWNER}/guardbench-results")
|
| 18 |
|
| 19 |
# Cache paths
|
src/submission/submit.py
CHANGED
|
@@ -118,7 +118,7 @@ def process_submission(file_path: str, metadata: Dict, version="v0") -> str:
|
|
| 118 |
model_name = metadata.get("model_name", "unknown")
|
| 119 |
model_name_safe = model_name.replace("/", "_").replace(" ", "_")
|
| 120 |
guard_model_type = metadata.get("guard_model_type", "unknown")
|
| 121 |
-
target_file = os.path.join(results_dir + "/
|
| 122 |
|
| 123 |
# Upload raw submission file
|
| 124 |
api = HfApi(token=TOKEN)
|
|
@@ -130,7 +130,7 @@ def process_submission(file_path: str, metadata: Dict, version="v0") -> str:
|
|
| 130 |
repo_type="dataset",
|
| 131 |
commit_message=f"Add raw submission for {model_name}"
|
| 132 |
)
|
| 133 |
-
os.makedirs(results_dir + "/
|
| 134 |
|
| 135 |
# (f"Submission path: {submission_path}")
|
| 136 |
# print(f"Target file: {target_file}")
|
|
@@ -147,9 +147,9 @@ def process_submission(file_path: str, metadata: Dict, version="v0") -> str:
|
|
| 147 |
# Set results directory
|
| 148 |
ctx.results_dir = results_dir
|
| 149 |
# Set bench name from the results directory
|
| 150 |
-
ctx.bench_name = "
|
| 151 |
# Load dataset
|
| 152 |
-
ctx.load_dataset("whitecircle-ai/
|
| 153 |
# Mark as initialized
|
| 154 |
ctx.is_initialized = True
|
| 155 |
|
|
|
|
| 118 |
model_name = metadata.get("model_name", "unknown")
|
| 119 |
model_name_safe = model_name.replace("/", "_").replace(" ", "_")
|
| 120 |
guard_model_type = metadata.get("guard_model_type", "unknown")
|
| 121 |
+
target_file = os.path.join(results_dir + "/circleguardbench_public", f"{model_name_safe}.jsonl")
|
| 122 |
|
| 123 |
# Upload raw submission file
|
| 124 |
api = HfApi(token=TOKEN)
|
|
|
|
| 130 |
repo_type="dataset",
|
| 131 |
commit_message=f"Add raw submission for {model_name}"
|
| 132 |
)
|
| 133 |
+
os.makedirs(results_dir + "/circleguardbench_public", exist_ok=True)
|
| 134 |
|
| 135 |
# (f"Submission path: {submission_path}")
|
| 136 |
# print(f"Target file: {target_file}")
|
|
|
|
| 147 |
# Set results directory
|
| 148 |
ctx.results_dir = results_dir
|
| 149 |
# Set bench name from the results directory
|
| 150 |
+
ctx.bench_name = "circleguardbench_public"
|
| 151 |
# Load dataset
|
| 152 |
+
ctx.load_dataset("whitecircle-ai/circleguardbench_public")
|
| 153 |
# Mark as initialized
|
| 154 |
ctx.is_initialized = True
|
| 155 |
|