logs
Browse files- src/submission/submit.py +4 -3
src/submission/submit.py
CHANGED
|
@@ -11,6 +11,7 @@ import shutil
|
|
| 11 |
|
| 12 |
from huggingface_hub import HfApi
|
| 13 |
from datasets import load_dataset
|
|
|
|
| 14 |
|
| 15 |
from src.display.formatting import styled_error, styled_message
|
| 16 |
from src.envs import RESULTS_DATASET_ID, TOKEN
|
|
@@ -133,8 +134,8 @@ def process_submission(file_path: str, metadata: Dict, version="v0") -> str:
|
|
| 133 |
print(f"Submission path: {submission_path}")
|
| 134 |
print(f"Target file: {target_file}")
|
| 135 |
print(f"Results dir: {results_dir}")
|
| 136 |
-
print(f"guarbench path: {
|
| 137 |
-
print(f"guarbench results path: {
|
| 138 |
|
| 139 |
print(f"Guardbench dir: {guardbench_dir}")
|
| 140 |
print(f"Guard model type: {guard_model_type}")
|
|
@@ -147,7 +148,7 @@ def process_submission(file_path: str, metadata: Dict, version="v0") -> str:
|
|
| 147 |
|
| 148 |
shutil.copy2(file_path, target_file)
|
| 149 |
print(f"Copied file to target file: {target_file}")
|
| 150 |
-
print(f" ls /home/user/app/guard-bench-submodule/results/guardbench_dataset_1k_public/: {
|
| 151 |
|
| 152 |
try:
|
| 153 |
# Initialize GuardBench context
|
|
|
|
| 11 |
|
| 12 |
from huggingface_hub import HfApi
|
| 13 |
from datasets import load_dataset
|
| 14 |
+
import subprocess
|
| 15 |
|
| 16 |
from src.display.formatting import styled_error, styled_message
|
| 17 |
from src.envs import RESULTS_DATASET_ID, TOKEN
|
|
|
|
| 134 |
print(f"Submission path: {submission_path}")
|
| 135 |
print(f"Target file: {target_file}")
|
| 136 |
print(f"Results dir: {results_dir}")
|
| 137 |
+
print(f"guarbench path: {subprocess.check_output('ls /home/user/app/guard-bench-submodule', shell=True).decode('utf-8')}")
|
| 138 |
+
print(f"guarbench results path: {subprocess.check_output('ls /home/user/app/guard-bench-submodule/results', shell=True).decode('utf-8')}")
|
| 139 |
|
| 140 |
print(f"Guardbench dir: {guardbench_dir}")
|
| 141 |
print(f"Guard model type: {guard_model_type}")
|
|
|
|
| 148 |
|
| 149 |
shutil.copy2(file_path, target_file)
|
| 150 |
print(f"Copied file to target file: {target_file}")
|
| 151 |
+
print(f" ls /home/user/app/guard-bench-submodule/results/guardbench_dataset_1k_public/: {subprocess.check_output('ls /home/user/app/guard-bench-submodule/results/guardbench_dataset_1k_public/', shell=True).decode('utf-8')}")
|
| 152 |
|
| 153 |
try:
|
| 154 |
# Initialize GuardBench context
|