forked from openml/automlbenchmark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecover_results.py
31 lines (22 loc) · 1.06 KB
/
recover_results.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
import argparse
import os
# prevent asap other modules from defining the root logger using basicConfig
import automl.logger
import automl
from automl import log
from automl.utils import Namespace as ns, config_load
parser = argparse.ArgumentParser()
parser.add_argument('instances', type=str, help="The path to an instances.csv file.")
parser.add_argument('-X', '--extra', default=[], action='append', help=argparse.SUPPRESS)
args = parser.parse_args()
extras = {t[0]: t[1] if len(t) > 1 else True for t in [x.split('=', 1) for x in args.extra]}
# script_name = os.path.splitext(os.path.basename(__file__))[0]
# log_dir = os.path.join(args.outdir if args.outdir else '.', 'logs')
# os.makedirs(log_dir, exist_ok=True)
# now_str = datetime_iso(date_sep='', time_sep='')
automl.logger.setup(root_level='DEBUG', console_level='INFO')
config = config_load("resources/config.yaml")
config.run_mode = 'script'
config.script = os.path.basename(__file__)
automl.resources.from_configs(config, ns.parse(extras))
aws = automl.AWSBenchmark.fetch_results(args.instances, force_update=True)