1. 16 Nov, 2023 1 commit
    • Arthur's avatar
      [`Styling`] stylify using ruff (#27144) · 651408a0
      Arthur authored
      
      
      * try to stylify using ruff
      
      * might need to remove these changes?
      
      * use ruf format andruff check
      
      * use isinstance instead of type comparision
      
      * use # fmt: skip
      
      * use # fmt: skip
      
      * nits
      
      * soem styling changes
      
      * update ci job
      
      * nits isinstance
      
      * more files update
      
      * nits
      
      * more nits
      
      * small nits
      
      * check and format
      
      * revert wrong changes
      
      * actually use formatter instead of checker
      
      * nits
      
      * well docbuilder is overwriting this commit
      
      * revert notebook changes
      
      * try to nuke docbuilder
      
      * style
      
      * fix feature exrtaction test
      
      * remve `indent-width = 4`
      
      * fixup
      
      * more nits
      
      * update the ruff version that we use
      
      * style
      
      * nuke docbuilder styling
      
      * leve the print for detected changes
      
      * nits
      
      * Remove file I/O
      Co-authored-by: default avatarcharliermarsh <charlie.r.marsh@gmail.com>
      
      * style
      
      * nits
      
      * revert notebook changes
      
      * Add # fmt skip when possible
      
      * Add # fmt skip when possible
      
      * Fix
      
      * More `  # fmt: skip` usage
      
      * More `  # fmt: skip` usage
      
      * More `  # fmt: skip` usage
      
      * NIts
      
      * more fixes
      
      * fix tapas
      
      * Another way to skip
      
      * Recommended way
      
      * Fix two more fiels
      
      * Remove asynch
      Remove asynch
      
      ---------
      Co-authored-by: default avatarcharliermarsh <charlie.r.marsh@gmail.com>
      651408a0
  2. 30 Oct, 2023 1 commit
  3. 16 Aug, 2023 1 commit
    • amyeroberts's avatar
      Input data format (#25464) · 6bca43bb
      amyeroberts authored
      * Add copied from statements for image processors
      
      * Move out rescale and normalize to base image processor
      
      * Remove rescale and normalize from vit (post rebase)
      
      * Update docstrings and tidy up
      
      * PR comments
      
      * Add input_data_format as preprocess argument
      
      * Resolve tests and tidy up
      
      * Remove num_channels argument
      
      * Update doc strings -> default ints not in code formatting
      6bca43bb
  4. 11 Aug, 2023 1 commit
    • amyeroberts's avatar
      Refactor image processor testers (#25450) · 41d56ea6
      amyeroberts authored
      * Refactor image processor test mixin
      
      - Move test_call_numpy, test_call_pytorch, test_call_pil to mixin
      - Rename mixin to reflect handling of logic more than saving
      - Add prepare_image_inputs, expected_image_outputs for tests
      
      * Fix for oneformer
      41d56ea6
  5. 02 Aug, 2023 1 commit
  6. 24 Jul, 2023 1 commit
  7. 14 Jul, 2023 1 commit
  8. 29 Jun, 2023 1 commit
  9. 22 Jun, 2023 1 commit
  10. 21 Jun, 2023 1 commit
  11. 28 Feb, 2023 1 commit
    • Yih-Dar's avatar
      馃敟Rework pipeline testing by removing `PipelineTestCaseMeta` 馃殌 (#21516) · 871c31a6
      Yih-Dar authored
      
      
      * Add PipelineTesterMixin
      
      * remove class PipelineTestCaseMeta
      
      * move validate_test_components
      
      * Add for ViT
      
      * Add to SPECIAL_MODULE_TO_TEST_MAP
      
      * style and quality
      
      * Add feature-extraction
      
      * update
      
      * raise instead of skip
      
      * add tiny_model_summary.json
      
      * more explicit
      
      * skip tasks not in mapping
      
      * add availability check
      
      * Add Copyright
      
      * A way to diable irrelevant tests
      
      * update with main
      
      * remove disable_irrelevant_tests
      
      * skip tests
      
      * better skip message
      
      * better skip message
      
      * Add all pipeline task tests
      
      * revert
      
      * Import PipelineTesterMixin
      
      * subclass test classes with PipelineTesterMixin
      
      * Add pipieline_model_mapping
      
      * Fix import after adding pipieline_model_mapping
      
      * Fix style and quality after adding pipieline_model_mapping
      
      * Fix one more import after adding pipieline_model_mapping
      
      * Fix style and quality after adding pipieline_model_mapping
      
      * Fix test issues
      
      * Fix import requirements
      
      * Fix mapping for MobileViTModelTest
      
      * Update
      
      * Better skip message
      
      * pipieline_model_mapping could not be None
      
      * Remove some PipelineTesterMixin
      
      * Fix typo
      
      * revert tests_fetcher.py
      
      * update
      
      * rename
      
      * revert
      
      * Remove PipelineTestCaseMeta from ZeroShotAudioClassificationPipelineTests
      
      * style and quality
      
      * test fetcher for all pipeline/model tests
      
      ---------
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      871c31a6
  12. 06 Feb, 2023 1 commit
    • Sylvain Gugger's avatar
      Update quality tooling for formatting (#21480) · 6f79d264
      Sylvain Gugger authored
      * Result of black 23.1
      
      * Update target to Python 3.7
      
      * Switch flake8 to ruff
      
      * Configure isort
      
      * Configure isort
      
      * Apply isort with line limit
      
      * Put the right black version
      
      * adapt black in check copies
      
      * Fix copies
      6f79d264
  13. 23 Jan, 2023 2 commits
    • amyeroberts's avatar
      Update tests: replace feature extractor tests with image processor (#20768) · e2bd7f80
      amyeroberts authored
      
      
      * Update imports and test fetcher
      
      * Revert but keep test fetcher update
      
      * Fix imports
      
      * Fix all imports
      
      * Replace fe with ip names
      
      * Add generate kwargs to `AutomaticSpeechRecognitionPipeline` (#20952)
      
      * Add generate kwargs to AutomaticSpeechRecognitionPipeline
      
      * Add test for generation kwargs
      
      * Update image processor parameters if creating with kwargs (#20866)
      
      * Update parameters if creating with kwargs
      
      * Shallow copy to prevent mutating input
      
      * Pass all args in constructor dict - warnings in init
      
      * Fix typo
      
      * Rename tester class
      
      * Rebase and tidy up
      
      * Fixup
      
      * Use ImageProcessingSavingTestMixin
      
      * Update property ref in tests
      
      * Update property ref in tests
      
      * Update recently merged in models
      
      * Small fix
      Co-authored-by: default avatarbofeng huang <bofenghuang7@gmail.com>
      e2bd7f80
    • amyeroberts's avatar
      Add test_image_processing_common.py (#20785) · 66459ce3
      amyeroberts authored
      * Add test_image_processing_common.py
      
      * Fix typo
      
      * Update imports and test fetcher
      
      * Revert but keep test fetcher update
      
      * Fix imports
      
      * Fix all imports
      
      * Formatting fix
      
      * Update tests/test_image_processing_common.py
      66459ce3
  14. 17 Jan, 2023 1 commit
  15. 04 Jan, 2023 1 commit
  16. 09 Dec, 2022 1 commit
  17. 11 Nov, 2022 1 commit
  18. 10 Nov, 2022 1 commit
    • Sanchit Gandhi's avatar
      [processor] Add 'model input names' property (#20117) · 905e5773
      Sanchit Gandhi authored
      * [processor] Add 'model input names' property
      
      * add test
      
      * no f string
      
      * add generic property method to mixin
      
      * copy to multimodal
      
      * copy to vision
      
      * tests for all audio
      
      * remove ad-hoc tests
      
      * style
      
      * fix flava test
      
      * fix test
      
      * fix processor code
      905e5773
  19. 04 Nov, 2022 1 commit
  20. 02 Nov, 2022 1 commit
    • amyeroberts's avatar
      Add Image Processors (#19796) · a6b77598
      amyeroberts authored
      
      
      * Add CLIP image processor
      
      * Crop size as dict too
      
      * Update warning
      
      * Actually use logger this time
      
      * Normalize doesn't change dtype of input
      
      * Add perceiver image processor
      
      * Tidy up
      
      * Add DPT image processor
      
      * Add Vilt image processor
      
      * Tidy up
      
      * Add poolformer image processor
      
      * Tidy up
      
      * Add LayoutLM v2 and v3 imsge processors
      
      * Tidy up
      
      * Add Flava image processor
      
      * Tidy up
      
      * Add deit image processor
      
      * Tidy up
      
      * Add ConvNext image processor
      
      * Tidy up
      
      * Add levit image processor
      
      * Add segformer image processor
      
      * Add in post processing
      
      * Fix up
      
      * Add ImageGPT image processor
      
      * Fixup
      
      * Add mobilevit image processor
      
      * Tidy up
      
      * Add postprocessing
      
      * Fixup
      
      * Add VideoMAE image processor
      
      * Tidy up
      
      * Add ImageGPT image processor
      
      * Fixup
      
      * Add ViT image processor
      
      * Tidy up
      
      * Add beit image processor
      
      * Add mobilevit image processor
      
      * Tidy up
      
      * Add postprocessing
      
      * Fixup
      
      * Fix up
      
      * Fix flava and remove tree module
      
      * Fix image classification pipeline failing tests
      
      * Update feature extractor in trainer scripts
      
      * Update pad_if_smaller to accept tuple and int size
      
      * Update for image segmentation pipeline
      
      * Update src/transformers/models/perceiver/image_processing_perceiver.py
      Co-authored-by: default avatarAlara Dirik <8944735+alaradirik@users.noreply.github.com>
      
      * Update src/transformers/image_processing_utils.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update src/transformers/models/beit/image_processing_beit.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * PR comments - docstrings; remove accidentally added resize; var names
      
      * Update docstrings
      
      * Add exception if size is not in the right format
      
      * Fix exception check
      
      * Fix up
      
      * Use shortest_edge in tuple in script
      Co-authored-by: default avatarAlara Dirik <8944735+alaradirik@users.noreply.github.com>
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      a6b77598
  21. 18 Oct, 2022 1 commit
    • David Yang's avatar
      Clean up deprecation warnings (#19654) · a23819ed
      David Yang authored
      * Clean up deprecation warnings
      
      Notes:
      Changed some strings in tests to raw strings, which will change the literal content of the strings as they are fed into whatever machine handles them.
      Test cases for past in the past/past_key_values switch changed/removed due to warning of impending removal
      
      * Add PILImageResampling abstraction for PIL.Image.Resampling
      a23819ed
  22. 09 Jun, 2022 1 commit
  23. 16 May, 2022 1 commit
  24. 11 May, 2022 1 commit
    • Amanpreet Singh's avatar
      [feat] Add FLAVA model (#16654) · a10f6183
      Amanpreet Singh authored
      * [WIP] Add FLAVA model
      
      This PR aims to add [FLAVA](ihttps://arxiv.org/abs/2112.04482) model to the transformers repo.
      
      Following checklist delineates the list of things to be done for this PR
      to be complete:
      
      [x] Flava init
      [x] Flava base models
      [x] Flava layers
      [x] Flava Configs
      [x] Flava encoders
      [x] Flava pretraining models
      [ ] Flava classification/retrieval models (To be added in a separate PR)
      [x] Documentation updates 
      [x] Imports updates 
      [x] Argstring updates
      [x] Flava pretrained checkpoints 
      [x] Flava tests
      [x] Flava processors 
      [x] Sanity check
      [x] Lint
      a10f6183