Skip to content

Commit

Permalink
fix imports of processors in layoutlm tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leloykun committed Aug 15, 2024
1 parent 57ed818 commit 85b4aec
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tests/models/layoutlmv2/test_processor_layoutlmv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from transformers import PreTrainedTokenizer, PreTrainedTokenizerBase, PreTrainedTokenizerFast
from transformers.models.layoutlmv2 import LayoutLMv2Tokenizer, LayoutLMv2TokenizerFast
from transformers.models.layoutlmv2.processing_layoutlmv2 import LayoutLMv2ProcessorKwargs
from transformers.models.layoutlmv2.processing_layoutlmv2 import LayoutLMv2Processor, LayoutLMv2ProcessorKwargs
from transformers.models.layoutlmv2.tokenization_layoutlmv2 import VOCAB_FILES_NAMES
from transformers.testing_utils import require_pytesseract, require_tokenizers, require_torch, slow
from transformers.utils import FEATURE_EXTRACTOR_NAME, cached_property, is_pytesseract_available
Expand All @@ -34,7 +34,7 @@
if is_pytesseract_available():
from PIL import Image

from transformers import LayoutLMv2ImageProcessor, LayoutLMv2Processor
from transformers import LayoutLMv2ImageProcessor


@require_pytesseract
Expand Down
4 changes: 2 additions & 2 deletions tests/models/layoutlmv3/test_processor_layoutlmv3.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from transformers import PreTrainedTokenizer, PreTrainedTokenizerBase, PreTrainedTokenizerFast
from transformers.models.layoutlmv3 import LayoutLMv3Tokenizer, LayoutLMv3TokenizerFast
from transformers.models.layoutlmv3.processing_layoutlmv3 import LayoutLMv3ProcessorKwargs
from transformers.models.layoutlmv3.processing_layoutlmv3 import LayoutLMv3Processor, LayoutLMv3ProcessorKwargs
from transformers.models.layoutlmv3.tokenization_layoutlmv3 import VOCAB_FILES_NAMES
from transformers.testing_utils import require_pytesseract, require_tokenizers, require_torch, slow
from transformers.utils import FEATURE_EXTRACTOR_NAME, cached_property, is_pytesseract_available
Expand All @@ -34,7 +34,7 @@
if is_pytesseract_available():
from PIL import Image

from transformers import LayoutLMv3ImageProcessor, LayoutLMv3Processor
from transformers import LayoutLMv3ImageProcessor


@require_pytesseract
Expand Down
4 changes: 2 additions & 2 deletions tests/models/layoutxlm/test_processor_layoutxlm.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from transformers import PreTrainedTokenizer, PreTrainedTokenizerBase, PreTrainedTokenizerFast
from transformers.models.layoutxlm import LayoutXLMTokenizer, LayoutXLMTokenizerFast
from transformers.models.layoutxlm.processing_layoutxlm import LayoutXLMProcessorKwargs
from transformers.models.layoutxlm.processing_layoutxlm import LayoutXLMProcessor, LayoutXLMProcessorKwargs
from transformers.testing_utils import (
require_pytesseract,
require_sentencepiece,
Expand All @@ -39,7 +39,7 @@
if is_pytesseract_available():
from PIL import Image

from transformers import LayoutLMv2ImageProcessor, LayoutXLMProcessor
from transformers import LayoutLMv2ImageProcessor


@require_pytesseract
Expand Down
1 change: 0 additions & 1 deletion tests/test_processing_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@

@require_torch
@require_vision
@require_torch
class ProcessorTesterMixin:
processor_class = None

Expand Down

0 comments on commit 85b4aec

Please sign in to comment.