1. 10 Jun, 2024 1 commit
    • Pavel Iakubovskii's avatar
      Decorators for deprecation and named arguments validation (#30799) · 517df566
      Pavel Iakubovskii authored
      
      
      * Fix do_reduce_labels for maskformer image processor
      
      * Deprecate reduce_labels in favor to do_reduce_labels
      
      * Deprecate reduce_labels in favor to do_reduce_labels (segformer)
      
      * Deprecate reduce_labels in favor to do_reduce_labels (oneformer)
      
      * Deprecate reduce_labels in favor to do_reduce_labels (maskformer)
      
      * Deprecate reduce_labels in favor to do_reduce_labels (mask2former)
      
      * Fix typo
      
      * Update mask2former test
      
      * fixup
      
      * Update segmentation examples
      
      * Update docs
      
      * Fixup
      
      * Imports fixup
      
      * Add deprecation decorator draft
      
      * Add deprecation decorator
      
      * Fixup
      
      * Add deprecate_kwarg decorator
      
      * Validate kwargs decorator
      
      * Kwargs validation (beit)
      
      * fixup
      
      * Kwargs validation (mask2former)
      
      * Kwargs validation (maskformer)
      
      * Kwargs validation (oneformer)
      
      * Kwargs validation (segformer)
      
      * Better message
      
      * Fix oneformer processor save-load test
      
      * Update src/transformers/utils/deprecation.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/utils/deprecation.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/utils/deprecation.py
      Co-authored-by: default avatarPablo Montalvo <39954772+molbap@users.noreply.github.com>
      
      * Update src/transformers/utils/deprecation.py
      Co-authored-by: default avatarPablo Montalvo <39954772+molbap@users.noreply.github.com>
      
      * Better handle classmethod warning
      
      * Fix typo, remove warn
      
      * Add header
      
      * Docs and `additional_message`
      
      * Move to filter decorator ot generic
      
      * Proper deprecation for semantic segm scripts
      
      * Add to __init__ and update import
      
      * Basic tests for filter decorator
      
      * Fix doc
      
      * Override `to_dict()` to pop depracated `_max_size`
      
      * Pop unused parameters
      
      * Fix trailing whitespace
      
      * Add test for deprecation
      
      * Add deprecation warning control parameter
      
      * Update generic test
      
      * Fixup deprecation tests
      
      * Introduce init service kwargs
      
      * Revert popping unused params
      
      * Revert oneformer test
      
      * Allow "metadata" to pass
      
      * Better docs
      
      * Fix test
      
      * Add notion in docstring
      
      * Fix notification for both names
      
      * Add func name to warning message
      
      * Fixup
      
      ---------
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      Co-authored-by: default avatarPablo Montalvo <39954772+molbap@users.noreply.github.com>
      517df566
  2. 31 May, 2024 1 commit
  3. 22 May, 2024 2 commits
  4. 17 May, 2024 3 commits
  5. 10 May, 2024 1 commit
  6. 08 May, 2024 1 commit
    • Pavel Iakubovskii's avatar
      Add examples for detection models finetuning (#30422) · 998dbe06
      Pavel Iakubovskii authored
      
      
      * Training script for object detection
      
      * Evaluation script for object detection
      
      * Training script for object detection with eval loop outside trainer
      
      * Trainer DETR finetuning
      
      * No trainer DETR finetuning
      
      * Eval script
      
      * Refine object detection example with trainer
      
      * Remove commented code and enable telemetry
      
      * No trainer example
      
      * Add requirements for object detection examples
      
      * Add test for trainer example
      
      * Readme draft
      
      * Fix uploading to HUB
      
      * Readme improvements
      
      * Update eval script
      
      * Adding tests for object-detection examples
      
      * Add object-detection example
      
      * Add object-detection resources to docs
      
      * Update README with custom dataset instructions
      
      * Update year
      
      * Replace valid with validation
      
      * Update instructions for custom dataset
      
      * Remove eval script
      
      * Remove use_auth_token
      
      * Add copied from and telemetry
      
      * Fixup
      
      * Update readme
      
      * Fix id2label
      
      * Fix links in docs
      
      * Update examples/pytorch/object-detection/run_object_detection.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update examples/pytorch/object-detection/run_object_detection.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Move description to the top
      
      * Fix Trainer example
      
      * Update no trainer example
      
      * Update albumentations version
      
      ---------
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      998dbe06
  7. 02 May, 2024 1 commit
  8. 01 May, 2024 2 commits
  9. 30 Apr, 2024 1 commit
    • Anton Vlasjuk's avatar
      Fix seq2seq collator padding (#30556) · 9112520b
      Anton Vlasjuk authored
      * fix seq2seq data collator to respect the given padding strategy
      
      further added tests for the seq2seq data collator in the style of the `data_collator_for_token_classification` (pt, tf, np)
      
      * formatting and change bool equals "==" to "is"
      
      * add missed return types in tests
      
      * update numpy test as it can handle unequal shapes, not like pt or tf
      9112520b
  10. 26 Apr, 2024 1 commit
  11. 18 Apr, 2024 2 commits
  12. 17 Apr, 2024 1 commit
  13. 15 Apr, 2024 1 commit
  14. 10 Apr, 2024 1 commit
    • Pavel Iakubovskii's avatar
      Fix and simplify semantic-segmentation example (#30145) · 56d001b2
      Pavel Iakubovskii authored
      * Remove unused augmentation
      
      * Fix pad_if_smaller() and remove unused augmentation
      
      * Add indentation
      
      * Fix requirements
      
      * Update dataset use instructions
      
      * Replace transforms with albumentations
      
      * Replace identity transform with None
      
      * Fixing formatting
      
      * Fixed comment place
      56d001b2
  15. 09 Apr, 2024 1 commit
  16. 08 Apr, 2024 2 commits
  17. 05 Apr, 2024 1 commit
  18. 02 Apr, 2024 1 commit
  19. 30 Mar, 2024 1 commit
  20. 21 Mar, 2024 1 commit
  21. 20 Mar, 2024 1 commit
  22. 15 Mar, 2024 1 commit
  23. 12 Mar, 2024 2 commits
  24. 11 Mar, 2024 2 commits
    • Yitong Huang's avatar
      Make torch xla available on GPU (#29334) · 873d9bb3
      Yitong Huang authored
      
      
      * add USE_TORCH_XLA env
      
      * rename torch_tpu to torch_xla
      
      * better is_torch_xla_available; fix some fsdp and performance issues
      
      * fix format
      
      * fix bug when pjrt_device is cpu
      
      * fix bug
      
      * fix the deprecation handling
      
      ---------
      Co-authored-by: default avataranw90 <ang868@gmail.com>
      Co-authored-by: default avatarwangang.wa <wangang.wa@alibaba-inc.com>
      873d9bb3
    • Tanay Mehta's avatar
      Add Fill-in-the-middle training objective example - PyTorch (#27464) · 6d67837f
      Tanay Mehta authored
      * add: initial script to train clm fim
      
      * fix: if training model from scratch, new tokens will be added and embeddings resized
      
      * fix: fixed attention_mask errors when generating FIM data
      
      * fix: file formatted using black
      
      * add: run_fim_no_trainer.py and fixed some comments in run_fim.py
      
      * add: added fim examples to the README.md and ran code fixup
      
      * fix: little bug in both fim training scripts
      
      * fix: remove comment from notebook and added a note on fim related params
      
      * fix: minor typo in README
      
      * add: suggested minor changes to README and run_fim.py
      
      * add: gradient_accumulation_steps and gradient_checkpointing args
      
      * add: improved model embedding resizing
      
      * add: pad_to_multiple_of and attn_implementation params
      
      * add: requested minor changes
      
      * add: deepspeed zero compatibility
      
      * add: resize embeddings layer with zero3 support for fim model initialization
      6d67837f
  25. 21 Feb, 2024 1 commit
  26. 19 Feb, 2024 2 commits
  27. 16 Feb, 2024 1 commit
  28. 12 Feb, 2024 2 commits
  29. 07 Feb, 2024 1 commit
  30. 02 Feb, 2024 1 commit
    • Klaus Hipp's avatar
      [Docs] Fix spelling and grammar mistakes (#28825) · 721ee783
      Klaus Hipp authored
      * Fix typos and grammar mistakes in docs and examples
      
      * Fix typos in docstrings and comments
      
      * Fix spelling of `tokenizer` in model tests
      
      * Remove erroneous spaces in decorators
      
      * Remove extra spaces in Markdown link texts
      721ee783