Transformers-Tutorials icon indicating copy to clipboard operation
Transformers-Tutorials copied to clipboard

Error while loading datasets in True inference with LayoutLMv2ForTokenClassification + Gradio demo.ipynb

Open akashlp27 opened this issue 1 year ago • 5 comments

OSError: Cannot find data file. Original error: cannot identify image file '/root/.cache/huggingface/datasets/downloads/extracted/e5bbbc543f8cc95554da124f3e80a57ed24d67d06ae1467da5810703f851e3f9/dataset/training_data/images/0000971160.png'

while loading dataset from

from datasets import load_dataset 
datasets = load_dataset("nielsr/funsd")

akashlp27 avatar Aug 01 '22 10:08 akashlp27

cc'ing @mariosasko. Also having this issue.

Got a similar issue with "nielsr/funsd-image-feature", even though this worked fine in the past.

NielsRogge avatar Aug 04 '22 17:08 NielsRogge

Hi! These datasets work without any issues for me locally or in Colab. Can you please paste the entire stack trace and the output of the datasets-cli env command?

mariosasko avatar Aug 08 '22 17:08 mariosasko

Yes I'm currently also not able to reproduce it. It's a weird issue, seems flaky.

If I encounter it again, will report here.

NielsRogge avatar Aug 09 '22 13:08 NielsRogge

I have encountered the exact same error, down to this specific image.

jocapello avatar Aug 09 '22 13:08 jocapello

I have encountered the exact same error, down to this specific image.

I believe I have solved it by replacing the line: !pip install -q detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.8/index.html

With: !python -m pip install -q 'git+https://github.com/facebookresearch/detectron2.git'

jocapello avatar Aug 09 '22 14:08 jocapello