Skip to content

Commit eb1ee39

Browse files
committed
Upload Ihsan's fix
1 parent 3dc78f8 commit eb1ee39

15 files changed

Lines changed: 28 additions & 158 deletions

File tree

-336 KB
Binary file not shown.

codabench/example_GPU/Example-GPU-Competition/competition.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ version: 2
66
title: Example GPU Competition
77
description: This is an example GPU test competition
88
image: logo.png
9-
registration_auto_approve: False
10-
enable_detailed_results: True
9+
registration_auto_approve: True
10+
enable_detailed_results: False
1111
docker_image: codalab/codalab-legacy:gpu310
1212

1313

@@ -21,9 +21,8 @@ phases:
2121
- index: 0
2222
name: Phase 1
2323
description: GPU Test Phase
24-
start: 2025-06-01
25-
end: 2026-06-01
26-
starting_kit: sample_code_submission
24+
start: 2026-01-01
25+
end: 2027-06-01
2726
tasks:
2827
- 0
2928

codabench/example_GPU/Example-GPU-Competition/ingestion_program/run_ingestion.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@
4343
output_dir = "/app/output"
4444
program_dir = "/app/program"
4545

46-
sys.path.append(program_dir)
47-
4846
ingestion = Ingestion()
4947
ingestion.check_gpu_availability()
5048
ingestion.save_gpu_status(output_dir)
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
# Overview
1+
# Overview
2+
***
23

3-
This is an example Competition to test if GPUs are available or not.
4+
This is an example Competition to test if GPUs are available or not.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Terms
2+
***
23

3-
Add your Terms to this page.
4+
Add your Terms to this page.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is a dummy submission for GPU Test Competition

codabench/example_GPU/Example-GPU-Competition/sample_code_submission/model.py

Lines changed: 0 additions & 90 deletions
This file was deleted.
Binary file not shown.

codabench/example_GPU/Example-GPU-Competition/scoring_output/detailed_results.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

codabench/example_GPU/Example-GPU-Competition/scoring_program/score.py

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -14,44 +14,8 @@ def load_ingestion_output(self, prediction_dir):
1414
self.gpu_detected = json.load(f)["gpu_detected"]
1515
print(f"GPU Detected: {self.gpu_detected}")
1616

17-
def load_ingestion_results(self, prediction_dir="./", score_dir="./"):
18-
"""
19-
Load the ingestion results.
20-
21-
Args:
22-
prediction_dir (str, optional): location of the predictions. Defaults to "./".
23-
score_dir (str, optional): location of the scores. Defaults to "./".
24-
"""
25-
ingestion_results_with_set_index = []
26-
# loop over sets (1 set = 1 value of mu)
27-
for file in os.listdir(prediction_dir):
28-
if file.startswith("result_"):
29-
set_index = int(
30-
file.split("_")[1].split(".")[0]
31-
) # file format: result_{set_index}.json
32-
results_file = os.path.join(prediction_dir, file)
33-
with open(results_file) as f:
34-
ingestion_results_with_set_index.append(
35-
{"set_index": set_index, "results": json.load(f)}
36-
)
37-
ingestion_results_with_set_index = sorted(
38-
ingestion_results_with_set_index, key=lambda x: x["set_index"]
39-
)
40-
self.ingestion_results = [
41-
x["results"] for x in ingestion_results_with_set_index
42-
]
43-
44-
self.score_file = os.path.join(score_dir, "scores.json")
45-
self.html_file = os.path.join(score_dir, "detailed_results.html")
46-
self.score_dir = score_dir
47-
logger.info(f"Read ingestion results from {prediction_dir}")
48-
4917
def save_leaderboard_result(self, output_dir):
5018

5119
score_file = os.path.join(output_dir, "scores.json")
5220
with open(score_file, "w") as f_score:
5321
f_score.write(json.dumps({"gpu_detected": self.gpu_detected}, indent=4))
54-
55-
def write_html(self, content):
56-
with open(self.html_file, "a", encoding="utf-8") as f:
57-
f.write(content)

0 commit comments

Comments
 (0)