mirror of
https://github.com/Doctorado-ML/benchmark.git
synced 2025-08-17 08:25:53 +00:00
26 lines
770 B
Python
Executable File
26 lines
770 B
Python
Executable File
#!/usr/bin/env python
|
|
from benchmark.Results import ReportBest
|
|
from benchmark.Experiments import BestResults
|
|
from benchmark.Datasets import Datasets
|
|
from benchmark.Arguments import Arguments
|
|
|
|
"""Build a json file with the best results of a model and its hyperparameters
|
|
"""
|
|
|
|
|
|
def main(args_test=None):
|
|
arguments = Arguments()
|
|
arguments.xset("score", mandatory=True).xset("report")
|
|
arguments.xset("model", mandatory=True)
|
|
args = arguments.parse(args_test)
|
|
datasets = Datasets()
|
|
best = BestResults(args.score, args.model, datasets)
|
|
try:
|
|
best.build()
|
|
except ValueError as e:
|
|
print(e)
|
|
else:
|
|
if args.report:
|
|
report = ReportBest(args.score, args.model, best=True, grid=False)
|
|
report.report()
|