Pavel Iakubovskii
517df566f5
Decorators for deprecation and named arguments validation (#30799)
* 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: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update src/transformers/utils/deprecation.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update src/transformers/utils/deprecation.py
Co-authored-by: Pablo Montalvo <39954772+molbap@users.noreply.github.com>
* Update src/transformers/utils/deprecation.py
Co-authored-by: Pablo 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: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
Co-authored-by: Pablo Montalvo <39954772+molbap@users.noreply.github.com>
2024-06-10 12:35:10 +01:00
..
2022-02-23 15:46:28 -05:00
2022-04-19 16:13:08 +01:00
2023-02-02 09:33:04 -05:00
2024-03-25 10:33:38 +01:00
2024-03-18 13:06:12 +00:00
2024-05-22 15:23:04 +01:00
2023-10-31 19:16:49 +01:00
2023-04-06 14:00:29 +02:00
2024-06-10 12:35:10 +01:00
2023-12-22 12:56:11 +01:00
2023-05-24 15:40:19 -04:00
2023-02-27 15:31:55 +00:00
2024-06-10 12:35:10 +01:00
2024-04-16 08:15:09 -04:00
2024-05-29 11:55:43 +01:00
2022-11-02 11:57:36 +00:00
2024-04-26 18:21:47 +01:00
2023-02-28 16:24:14 -05:00
2022-05-12 16:25:55 -04:00
2024-02-02 14:11:50 +01:00
2024-01-30 17:26:36 +00:00
2024-05-29 11:55:43 +01:00
2023-02-06 18:10:56 -05:00
2024-01-15 18:36:40 +00:00
2024-04-03 09:25:01 +02:00