forked from airayanc/ZSAD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrunner.py
37 lines (34 loc) · 1005 Bytes
/
runner.py
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
# -----------------------------------------------------------------------------
# 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,
)