arvindrajan92 / DTrOCR

A PyTorch implementation of DTrOCR: Decoder-only Transformer for Optical Character Recognition
MIT License
46 stars 6 forks source link

Issue with the error : #12

Closed kasuba-badri-vishal closed 1 month ago

kasuba-badri-vishal commented 1 month ago

Hi @arvindrajan92 ,

Thank you for your efforts in replicating DTrOCR.

Recently, I tried the sample example notebook to fine-tune the model on IAM dataset from here

Data is getting loaded effectively, but getting Unused or unrecognized kwargs: padding. error. This issue is popping up for the same IAM dataset as suggested for finetuning.

I have tried to change padding=False and also padding='longest' and padding='do_not_pad' as arguments instead of padding='max_length', but do not seem to address the issue.

Please kindly let me know how to address this issue. I have attached a screenshot of the tracktrace for your reference. Thanks

Error

arvindrajan92 commented 1 month ago

@kasuba-badri-vishal, Thank you for bringing this to my attention. I will check in a moment.

Can you share with me the python and PyTorch versions? I'll see if I can reproduce.

kasuba-badri-vishal commented 1 month ago

Certainly, here are the details of my environment:

Python version: 3.10.12 PyTorch version: 2.3.1+cu121 GPU: NVIDIA RTX A6000 Driver Version: 535[535.183.01] CUDA Version: 12.2 If you need any additional information, please let me know. Thanks

arvindrajan92 commented 1 month ago

Certainly, here are the details of my environment:

Python version: 3.10.12 PyTorch version: 2.3.1+cu121 GPU: NVIDIA RTX A6000 Driver Version: 535[535.183.01] CUDA Version: 12.2 If you need any additional information, please let me know. Thanks

@kasuba-badri-vishal, could you also share with me the version of transformers library please?

arvindrajan92 commented 1 month ago

I managed to reproduce the issue and seems to be related to https://github.com/huggingface/transformers/pull/31950.

arvindrajan92 commented 1 month ago

It should be gone now @kasuba-badri-vishal if you could pull the latest main branch. If you still see it, feel free to reopen this issue.

kasuba-badri-vishal commented 1 month ago

Yes, it is addressed now. Thanks for the quick fix🙏