hushell / pmf_cvpr22

183 stars 24 forks source link

when I run 'convert_tfrecord_to_h5.py' #6

Closed Yxt1212 closed 2 years ago

Yxt1212 commented 2 years ago

There is a OSError,ilsvrc_2012/0.index not found, please tell me how to solve this problem.Or you can provide a link for downloading the h5 files.Thanks

anish9 commented 2 years ago

@Yxt1212, The fix can be found here, https://github.com/mboudiaf/pytorch-meta-dataset, generate the index files given the tfrecord folder. In my case I customized the following lines in Makefile to:

index_files:

    source_path=/home/anish/anish/pytorch-meta-dataset/omniglot/omniglot/; #${RECORDS}/$${source} ;\
    find $${source_path} -name '*.tfrecords' -type f -exec sh -c '$(exec)3 -m tfrecord.tools.tfrecord2idx $$2 $${2%.tfrecords}.index' sh $${source_path} {} \; ;\

example : /home/anish/anish/pytorch-meta-dataset/omniglot/omniglot/*.tfrecords this is my tfrecord path

hushell commented 2 years ago

Thanks @anish9! Great finding!

@Yxt1212 Sorry for missing the important step! Readme updated.