Is there any method to force loading the full dataset into memroy instead of lazily load in OpenNMT-py?

pytorch

(Maplewizard) #1

Hi, since my dataset is small. I want to load it into memory once, instead of loading from the disk again and again. It takes most of its time showing the message:

Loading train dataset from nmt_input/input.train.1.pt number of examples: 226