save the pickle data with bz2 compression and FP32. it saves up to x5 data size

This commit is contained in:
longyu 2022-09-18 10:21:36 +02:00
parent ab78fb373a
commit ae79f79d92

View File

@ -420,8 +420,8 @@ class FreqaiDataDrawer:
rapidjson.dump(dk.data, fp, default=self.np_encoder, number_mode=rapidjson.NM_NATIVE) rapidjson.dump(dk.data, fp, default=self.np_encoder, number_mode=rapidjson.NM_NATIVE)
# save the train data to file so we can check preds for area of applicability later # save the train data to file so we can check preds for area of applicability later
dk.data_dictionary["train_features"].to_pickle( dk.data_dictionary["train_features"].astype("floa32").to_pickle(
save_path / f"{dk.model_filename}_trained_df.pkl" save_path / f"{dk.model_filename}_trained_df.pkl.bz2"
) )
dk.data_dictionary["train_dates"].to_pickle( dk.data_dictionary["train_dates"].to_pickle(