1. 23 Nov, 2023 1 commit
  2. 17 Nov, 2023 1 commit
  3. 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
  4. 15 Nov, 2023 1 commit
    • NielsRogge's avatar
      [Fuyu] Add tests (#27001) · cc0dc24b
      NielsRogge authored
      * Add tests
      
      * Add integration test
      
      * More improvements
      
      * Fix tests
      
      * Fix style
      
      * Skip gradient checkpointing tests
      
      * Update script
      
      * Remove scripts
      
      * Remove Fuyu from auto mapping
      
      * Fix integration test
      
      * More improvements
      
      * Remove file
      
      * Add Fuyu to slow documentation tests
      
      * Address comments
      
      * Clarify comment
      cc0dc24b
  5. 02 Nov, 2023 1 commit
    • Pablo Montalvo's avatar
      Fuyu: improve image processing (#27007) · 8a312956
      Pablo Montalvo authored
      
      
      * Fix Fuyu image scaling bug
      
      It could produce negative padding and hence inference errors for certain
      image sizes.
      
      * initial rework commit
      
      * add batching capabilities, refactor image processing
      
      * add functional batching for a list of images and texts
      
      * make args explicit
      
      * Fuyu processing update (#27133)
      
      * Add file headers
      
      * Add file headers
      
      * First pass - preprocess method with standard args
      
      * First pass image processor rework
      
      * Small tweaks
      
      * More args and docstrings
      
      * Tidying iterating over batch
      
      * Tidying up
      
      * Modify to have quick tests (for now)
      
      * Fix up
      
      * BatchFeature
      
      * Passing tests
      
      * Add tests for processor
      
      * Sense check when patchifying
      
      * Add some tests
      
      * FuyuBatchFeature
      
      * Post-process box coordinates
      
      * Update to `size` in processor
      
      * Remove unused and duplicate constants
      
      * Store unpadded dims after resize
      
      * Fix up
      
      * Return FuyuBatchFeature
      
      * Get unpadded sizes after resize
      
      * Update exception
      
      * Fix return
      
      * Convert input `<box>` coordinates to model format.
      
      * Post-process point coords, support multiple boxes/points in a single
      sequence
      
      * Replace constants
      
      * Update src/transformers/models/fuyu/image_processing_fuyu.py
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      
      * Preprocess List[List[image]]
      
      * Update src/transformers/models/fuyu/image_processing_fuyu.py
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      
      * Update to Amy's latest state.
      
      * post-processing returns a list of tensors
      
      * Fix error when target_sizes is None
      Co-authored-by: default avatarPablo Montalvo <pablo.montalvo.leroux@gmail.com>
      
      * Update src/transformers/models/fuyu/image_processing_fuyu.py
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      
      * Update src/transformers/models/fuyu/image_processing_fuyu.py
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      
      * Update src/transformers/models/fuyu/image_processing_fuyu.py
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      
      * Update src/transformers/models/fuyu/image_processing_fuyu.py
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      
      * Review comments
      
      * Update src/transformers/models/fuyu/image_processing_fuyu.py
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      
      * Fix up
      
      * Fix up
      
      ---------
      Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-72-126.ec2.internal>
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      Co-authored-by: default avatarPablo Montalvo <pablo.montalvo.leroux@gmail.com>
      
      * Fix conflicts in fuyu_follow_up_image_processing (#27228)
      
      fixing conflicts and updating on main
      
      * Revert "Fix conflicts in fuyu_follow_up_image_processing" (#27232)
      
      Revert "Fix conflicts in fuyu_follow_up_image_processing (#27228)"
      
      This reverts commit acce10b6c653dc7041fb9d18cfed55775afd6207.
      
      ---------
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-72-126.ec2.internal>
      8a312956
  6. 31 Oct, 2023 1 commit
    • Hz, Ji's avatar
      device agnostic models testing (#27146) · 50378cbf
      Hz, Ji authored
      * device agnostic models testing
      
      * add decorator `require_torch_fp16`
      
      * make style
      
      * apply review suggestion
      
      * Oops, the fp16 decorator was misused
      50378cbf
  7. 18 Oct, 2023 1 commit
    • Pablo Montalvo's avatar
      Add fuyu model (#26911) · caa0ff0b
      Pablo Montalvo authored
      
      
      * initial commit
      
      * add processor, add fuyu naming
      
      * add draft processor
      
      * fix processor
      
      * remove dropout to fix loading of weights
      
      * add image processing fixes from Pedro
      
      * fix
      
      * fix processor
      
      * add basic processing fuyu test
      
      * add documentation and TODO
      
      * address comments, add tests, add doc
      
      * replace assert with torch asserts
      
      * add Mixins and fix tests
      
      * clean imports
      
      * add model tester, clean imports
      
      * fix embedding test
      
      * add updated tests from pre-release model
      
      * Processor: return input_ids used for inference
      
      * separate processing and model tests
      
      * relax test tolerance for embeddings
      
      * add test for logit comparison
      
      * make sure fuyu image processor is imported in the init
      
      * fix formattingh
      
      * more formatting issues
      
      * and more
      
      * fixups
      
      * remove some stuff
      
      * nits
      
      * update init
      
      * remove the fuyu file
      
      * Update integration test with release model
      
      * Update conversion script.
      
      The projection is not used, as confirmed by the authors.
      
      * improve geenration
      
      * Remove duplicate function
      
      * Trickle down patches to model call
      
      * processing fuyu updates
      
      * remove things
      
      * fix prepare_inputs_for_generation to fix generate()
      
      * remove model_input
      
      * update
      
      * add generation tests
      
      * nits
      
      * draft leverage automodel and autoconfig
      
      * nits
      
      * fix dtype patch
      
      * address comments, update READMEs and doc, include tests
      
      * add working processing test, remove refs to subsequences
      
      * add tests, remove Sequence classification
      
      * processing
      
      * update
      
      * update the conversion script
      
      * more processing cleanup
      
      * safe import
      
      * take out ModelTesterMixin for early release
      
      * more cl;eanup
      
      * more cleanup
      
      * more cleanup
      
      * and more
      
      * register a buffer
      
      * nits
      
      * add postprocessing of generate output
      
      * nits
      
      * updates
      
      * add one working test
      
      * fix test
      
      * make fixup works
      
      * fixup
      
      * Arthur's updates
      
      * nits
      
      * update
      
      * update
      
      * fix processor
      
      * update tests
      
      * passe more fixups
      
      * fix
      
      * nits
      
      * don't import torch
      
      * skip fuyu config for now
      
      * fixup done
      
      * fixup
      
      * update
      
      * oups
      
      * nits
      
      * Use input embeddings
      
      * no buffer
      
      * update
      
      * styling processing fuyu
      
      * fix test
      
      * update licence
      
      * protect torch import
      
      * fixup and update not doctested
      
      * kwargs should be passed
      
      * udpates
      
      * update the impofixuprts in the test
      
      * protect import
      
      * protecting imports
      
      * protect imports in type checking
      
      * add testing decorators
      
      * protect top level import structure
      
      * fix typo
      
      * fix check init
      
      * move requires_backend to functions
      
      * Imports
      
      * Protect types
      
      ---------
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      Co-authored-by: default avatarArthurZucker <arthur.zucker@gmail.com>
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      Co-authored-by: default avatarLysandre <lysandre@huggingface.co>
      caa0ff0b