Spaces:
Sleeping
Sleeping
File size: 765 Bytes
654e9ae |
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 32 33 |
import pandas as pd
import numpy as np
import lightgbm as lgb
import argparse
import pickle
import yaml
import math
import time
def main(pickledir):
with open(pickledir, 'rb') as fd:
each_faction_dataset = pickle.load(fd)
for faction in each_faction_dataset.keys():
X_data = lgb.Dataset(each_faction_dataset[faction]['features'])
y_data = each_faction_dataset[faction]['vp']
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Input DVC params.')
parser.add_argument('--params', type=str)
args = parser.parse_args()
paramsdir = args.params
with open(paramsdir, 'r') as fd:
params = yaml.safe_load(fd)
pickledir = params['prepare-step2']['pickle-dir']
main(pickledir)
|