forked from MFajcik/RumourEval2019
-
Notifications
You must be signed in to change notification settings - Fork 0
/
solver.py
31 lines (24 loc) · 845 Bytes
/
solver.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
import json
import logging
import os
import sys
from solutionsA import SolutionA
from utils.utils import setup_logging
__author__ = "Martin Fajčík"
class TaskSolver():
def __init__(self, config: dict):
self.config = config
def solvetask(self, taskname: str):
if taskname == "A":
solution = SolutionA(self.config)
solution.create_model()
if __name__ == "__main__":
with open("configurations/config.json") as conffile:
config = json.load(conffile)
setup_logging(os.path.basename(sys.argv[0]).split(".")[0],
logpath="logs/",
config_path="configurations/logging.yml")
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
logging.debug("Configuration:\n" + json.dumps(config, indent=4))
solver = TaskSolver(config)
solver.solvetask("A")