-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
22 lines (17 loc) · 804 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import luigi
import argparse
import numpy as np
from src.utils import load_data
from src.model import ModelTrainingTask
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='search method for similar weather days.')
parser.add_argument('--weather_csv', type=str, required=True)
parser.add_argument('--demand_csv', type=str, required=True)
parser.add_argument('--period', type=int, default=1)
args = parser.parse_args()
luigi.configuration.LuigiConfigParser.add_config_path('./conf/model_conf.ini')
np.random.seed(2000)
luigi.build([ModelTrainingTask(demand_filepath=args.demand_csv,
weather_filepath=args.weather_csv,
period=args.period,)],
local_scheduler=True)