-
Notifications
You must be signed in to change notification settings - Fork 0
/
processlet.py
35 lines (29 loc) · 1.18 KB
/
processlet.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
32
33
34
35
import sys
import os.path
sys.path.append('I:/FB_Coding/BDT')
import matplotlib
matplotlib.use('SVG')
import sweetviz.series_analyzer as sa
#from sweetviz.config import config
import pickle
import time
#temp_folder = config["Files"].get("temp_folder")
# full_path_to_pickled = "../sweetviz-temp/5e52a452__click_id.pkl"
full_path_to_pickled = sys.argv[1]
with open(full_path_to_pickled, 'rb') as handle:
feature_to_process = pickle.load(handle)
# start = time.perf_counter()
# print("OHHHHH:" + str(feature_to_process))
#print("OHHHHH:")
analysis_dictionary = sa.analyze_feature_to_dictionary(feature_to_process)
#analysis_dictionary = dict()
#print(analysis_dictionary)
split_source_path = os.path.split(full_path_to_pickled)
full_path_to_pickled_out = os.path.join(split_source_path[0],
os.path.splitext(
split_source_path[1])[0]
+ "_out.pkl")
with open(full_path_to_pickled_out, 'wb') as handle:
pickle.dump(analysis_dictionary, handle)
# print(f"PROCESS------> {feature_to_process.source.name}"
# f" {time.perf_counter() - start}")