Commit 55f86604 authored by dasharatha.vamshi's avatar dasharatha.vamshi

added logs

parent d8222015
......@@ -89,12 +89,15 @@ if __name__ == '__main__':
data, date_pkl, forcast_df = obj.preprocess(json_path, standard_scalar_path, fillna_method)
logger.info("Got the data writing it to pickle files and csv files (preprocessed_X.pkl and date_X.pkl and forcast_data.csv)")
try:
logger.info("Writing preprocessed data to pkl file at " + os.path.join(shared_volume, 'preprocessed_X.pkl'))
output = open(os.path.join(shared_volume, 'preprocessed_X.pkl'), 'wb')
pickle.dump(data, output)
output.close()
logger.info("Writing date data to pkl file at " + os.path.join(shared_volume, 'date_X.pkl'))
output1 = open(os.path.join(shared_volume, 'date_X.pkl'), 'wb')
pickle.dump(date_pkl, output1)
output1.close()
logger.info("Writing forcast data to csv file at " + os.path.join(shared_volume, 'forcast_data.csv'))
output2 = os.path.join(shared_volume, 'forcast_data.csv')
forcast_df.to_csv(output2, index=False)
logger.info("Component executed Successfully")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment