Issue with dataset viewer

#1
by albertvillanova HF staff - opened

After investigation, it seems there is an issue with dl_manager.iter_files in streaming mode. We are investigating it.

In the meantime, you could circumvent this issue by using sorted(glob.glob( instead.

This issue should be fixed by #2.

Thanks @albertvillanova for the support.

Is the root of the problem the dl_manager.iter_files when there is _MACOSX dir? if I ignore somehow the later with .gitignore should the script work properly as before?

Does dl_manager.iter_files(img_data_files) perform some implicit sort behind? I mean, if for circumvent the issue is used sorted(glob.glob(os.path.join(img_data_files, "*", "*.jpg"))) in #2.

Hi @alkzar90 ,

No, the root cause is not the presence of _MACOX dir. I suggested skipping it just for performance: no need to iterate over its content.

The root cause is a bug in iter_files in streaming mode: normally it should sort the files, but that is not working in this case and the order of the files is random at every call. Then your if condition (to check that both text and image filenames have the same basename) is always False.

Fixed by #2.

albertvillanova changed discussion status to closed

Sign up or log in to comment