huggingface / pixparse

Pixel Parsing. A reproduction of OCR-free end-to-end document understanding models with open data
11 stars 3 forks source link

Redundancy between step and _forward #29

Open molbap opened 11 months ago

molbap commented 11 months ago

In PR #24 , CORD finetune has both step and forward

https://github.com/huggingface/pixparse/blob/9143e50498672326208ba07b2efa70844f055c5b/src/pixparse/task/task_cruller_finetune_CORD.py#L409C1-L442C1

step should be used only in the framework

finetune_docVQA has step & forward intertwined https://github.com/huggingface/pixparse/blob/9143e50498672326208ba07b2efa70844f055c5b/src/pixparse/task/task_cruller_finetune_docvqa.py#L279C1-L312C45

Solution: move step method to framework!