mirror of
https://github.com/Doctorado-ML/benchmark.git
synced 2025-08-16 07:55:54 +00:00
24 lines
706 B
Python
24 lines
706 B
Python
import os
|
|
import json
|
|
|
|
from Experiments import Files, Folders
|
|
|
|
|
|
versions = dict(SVC="-", STree="1.2.3", ODTE="0.3.1")
|
|
|
|
results = Files().get_all_results()
|
|
for result in results:
|
|
print(result)
|
|
file_name = os.path.join(Folders.results, result)
|
|
with open(file_name) as f:
|
|
data = json.load(f)
|
|
if "title" not in data:
|
|
print(f"Repairing title in {result}")
|
|
data["title"] = "default"
|
|
if "version" not in data:
|
|
print(f"Repairing version in {result}")
|
|
model = data["model"]
|
|
data["version"] = versions[model] if model in versions else "-"
|
|
with open(file_name, "w") as f:
|
|
json.dump(data, f, indent=4)
|