def _cache_dataset(dataset, prefix):
if not os.path.exists(_constants.CACHE_PATH):<EOL><INDENT>os.makedirs(_constants.CACHE_PATH)<EOL><DEDENT>src_data = np.concatenate([e[<NUM_LIT:0>] for e in dataset])<EOL>tgt_data = np.concatenate([e[<NUM_LIT:1>] for e in dataset])<EOL>src_cumlen = np.cumsum([<NUM_LIT:0>]+[len(e[<NUM_LIT:0>]) for e in dataset])<EOL>tgt_cumlen = np.cumsum([<NUM_LIT:0>]+[len(e[<NUM_LIT:1>]) for e in dataset])<EOL>np.savez(os.path.join(_constants.CACHE_PATH, prefix + '<STR_LIT>'),<EOL>src_data=src_data, tgt_data=tgt_data,<EOL>src_cumlen=src_cumlen, tgt_cumlen=tgt_cumlen)<EOL>
Cache the processed npy dataset the dataset into a npz

    Parameters
    ----------
    dataset : SimpleDataset
    file_path : str