to make the iteration faster
try: with open('features.pkl', 'br') as f: open_prices, close_prices, features = pickle.load(f) except: open_prices, close_prices, features = DataGenerator.make_features('2010-01-01', '2019-05-08', 's', is_training=True) with open('features.pkl', 'bw') as f: pickle.dump((open_prices, close_prices, features), f)
Comment is the energy for a writer, thanks!