LSTR icon indicating copy to clipboard operation
LSTR copied to clipboard

Little bug in db/custom.py

Open juanllaguno opened this issue 3 years ago • 1 comments

I think I find a little bug in the code.

In the line 79: self._cache_file = os.path.join(cache_dir, "{}.pkl".format(self._data, self._split)) It is missing one "{}" because how it is now it only creates one cache file .pkl, and as far as I understand one file is for training and one for validation. Otherwise the validation dataset is the same that the train dataset. Also the varible self._split is set to None, so the solution I find was:

self._split = split
self._cache_file = os.path.join(cache_dir, "{}_{}.pkl".format(self._data, self._split))

So this way the validation dataset is different that the training dataset.

Thanks for the contribution and the good work!

juanllaguno avatar Feb 24 '22 14:02 juanllaguno

I also noticed this mistake and am about to bring it up.🤣

flinzhao avatar Jan 04 '24 08:01 flinzhao