Closed shenyehui closed 1 year ago
Thanks for your interest.
It is mandatory that embeddings cache be built at the start of training epoch. This ensures that self.cache is not None whenever the __get_item()__
is being executed.
Although embedding cache is built at the beginning of training epoch,In class QueryDatasetFromStruct(data.Dataset): def init()...,define self.cache = None,Won't self.cache become none due to this command。 (您好,我还是没能明白,虽然在epoch开始前定义了self.cache的路径,但是在class QueryDatasetFromStruct(data.Dataset)的初始化里面定义了self.cache=none,然后才执行with h5py.File(self.cache, mode='r') as h5,这样不会覆盖前面的命令使得self.cache=none吗?)
The execution flow is:
init()
: self.cache=None__get_item()__
: read from self.cacheThank you for your patience in answering
Thank you for your great work! But I have a question about your pitts.py code. Since self.cache = None in line 253, is there no file open in line 270 with h5py.File(self.cache, mode='r') as h5, then the meaning of the code with h5py.File(self.cache, mode='r') as h5 is What?