File size: 1,005 Bytes
16a0f31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# -----------------------------------------------------------------------------
#  This Python script is the primary entry point called by our judge. It runs
#  your code to generate anomaly scores, then evaluates those scores to produce
#  the final results.
# -----------------------------------------------------------------------------

import subprocess

# Step 1: Generate anomaly scores
subprocess.run(["./run.sh"], check=True)

# Step 2: Evaluate the generated scores
subprocess.run(
    [
        "python3",
        "evaluation/eval_main.py",
        "--device",
        "0",
        "--data_path",
        "./data/",
        "--dataset_name",
        "rayan_dataset",
        "--class_name",
        "all",
        "--output_dir",
        "./output",
        "--output_scores_dir",
        "./output_scores",
        "--save_csv",
        "True",
        "--save_json",
        "True",
        "--class_name_mapping_dir",
        "./evaluation/class_name_mapping.json",
    ],
    check=True,
)