It seems to me that using data block API with the following methods will have unexpected issue. Split_by_fname_file() won’t read from path_new, instead of using the old path in from_folder().
Please let me know if this is a bug or my misunderstanding.
split_by_fname_file will return FileNotFoundError at path ‘…/data/images/valid.txt’
should read fname from path ‘…/data/valid.txt’
As I also looked at source code
def split_by_fname_file(self, fname:PathOrStr, path:PathOrStr=None)->‘ItemLists’:
“Split the data by using the names in
fname for the validation set.
path will override
path = Path(ifnone(path, self.path))
valid_names = loadtxt_str(self.path/fname)
Should we loadtxt_str(path/fname) instead of (self.path/fname)? As we already set path in the previous step?