Yih-Dar
871c31a6f1
🔥 Rework pipeline testing by removing PipelineTestCaseMeta
🚀 ( #21516 )
...
* 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: ydshieh <ydshieh@users.noreply.github.com>
2023-02-28 19:40:57 +01:00
Sylvain Gugger
6f79d26442
Update quality tooling for formatting ( #21480 )
...
* 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
2023-02-06 18:10:56 -05:00
Alara Dirik
f424b09410
Fix MaskFormerImageProcessor.post_process_instance_segmentation ( #21256 )
...
* fix instance segmentation post processing
* add Mask2FormerImageProcessor
2023-01-24 18:49:29 +03:00
amyeroberts
e2bd7f80d0
Update tests: replace feature extractor tests with image processor ( #20768 )
...
* 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: bofeng huang <bofenghuang7@gmail.com>
2023-01-23 17:25:41 +00:00
amyeroberts
354ea44340
Replace reduce_labels with do_reduce_labels ( #21218 )
...
* Replace reduce_labels with do_reduce_labels
* Replace only for __init__ and preprocess
* Update tests
2023-01-23 17:21:33 +00:00
amyeroberts
66459ce319
Add test_image_processing_common.py ( #20785 )
...
* 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
2023-01-23 13:48:30 +00:00
amyeroberts
0dde58978a
Rename test_feature_extraction files ( #21140 )
...
* Rename files
* Update file names in tests
2023-01-17 14:04:07 +00:00
Alara Dirik
52c9e6af29
Fix bug in segmentation postprocessing ( #20198 )
...
* Fix post_process_instance_segmentation
* Add test for label fusing
2023-01-04 18:34:58 +03:00
amyeroberts
292acd71d6
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
2023-01-04 14:29:48 +00:00
Yih-Dar
704027f0ef
skip test_multi_gpu_data_parallel_forward
for MaskFormerSwinModelTest
( #20688 )
...
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-12-09 11:10:00 +01:00
NielsRogge
b610c47f89
[MaskFormer] Add support for ResNet backbone ( #20483 )
...
* Add SwinBackbone
* Add hidden_states_before_downsampling support
* Fix Swin tests
* Improve conversion script
* Add id2label mappings
* Add vistas mapping
* Update comments
* Fix backbone
* Improve tests
* Extend conversion script
* Add Swin conversion script
* Fix style
* Revert config attribute
* Remove SwinBackbone from main init
* Remove unused attribute
* Use encoder for ResNet backbone
* Improve conversion script and add integration test
* Apply suggestion
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-12-07 09:42:38 +01:00
amyeroberts
de6d19ea92
Add segmentation + object detection image processors ( #20160 )
...
* Add transforms for object detection
* DETR models + Yolos
* Scrappy additions
* Maskformer image processor
* Fix up; MaskFormer tests
* Update owlvit processor
* Add to docs
* OwlViT tests
* Update pad logic
* Remove changes to transforms
* Import fn directly
* Update to include pad transformation
* Remove uninstended changes
* Add new owlvit post processing function
* Tidy up
* Fix copies
* Fix some copies
* Include device fix
* Fix scipy imports
* Update _pad_image
* Update padding functionality
* Fix bug
* Properly handle ignore index
* Fix up
* Remove defaults to None in docstrings
* Fix docstrings & docs
* Fix sizes bug
* Resolve conflicts in init
* Cast to float after resizing
* Tidy & add size if missing
* Allow kwards when processing for owlvit
* Update test values
2022-11-30 10:24:03 +00:00
NielsRogge
6dc884abc8
[Maskformer] Add MaskFormerSwin backbone ( #20344 )
...
* First draft
* Fix backwards compatibility
* More fixes
* More fixes
* Make backbone more general
* Improve backbone
* Improve test
* Fix config checkpoint
* Address comments
* Use model_type
* Address more comments
* Fix special model names
* Remove MaskFormerSwinModel and MaskFormerSwinPreTrainedModel from main init
* Fix typo
* Update backbone
* Apply suggestion
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-11-28 20:33:49 +01:00
NielsRogge
b4997382da
Fix MaskformerFeatureExtractor ( #20100 )
...
* Fix bug
* Add another fix
* Add print statement
* Apply fix
* Fix feature extractor
* Fix feature extractor
* Add print statements
* Add print statements
* Remove print statements
* Add instance segmentation integration test
* Add integration test for semantic segmentation
* Add draft for panoptic segmentation integration test
* Fix integration test for panoptic segmentation
* Remove slow annotator
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-11-15 16:00:37 +01:00
Alara Dirik
cca51aa151
Fix image segmentation pipeline errors, resolve backward compatibility issues ( #19768 )
...
* Fix panoptic segmentation and pipeline
* Update ImageSegmentationPipeline tests and reenable test_small_model_pt
* Resolve backward compatibility issues
2022-10-21 18:09:58 +03:00
Alara Dirik
7598791c09
Fix MaskFormer failing postprocess tests ( #19354 )
...
Ensures post_process_instance_segmentation and post_process_panoptic_segmentation methods return a tensor of shape (target_height, target_width) filled with -1 values if no segment with score > threshold is found.
2022-10-05 23:25:58 +03:00
Sylvain Gugger
c875a96eb1
Test failing test while we resolve the issue. ( #19355 )
2022-10-05 12:23:48 -04:00
Alara Dirik
07e94bf159
Maskformer post-processing fixes and improvements ( #19172 )
...
- Improves MaskFormer docs, corrects minor typos
- Restructures MaskFormerFeatureExtractor.post_process_panoptic_segmentation for better readability, adds target_sizes argument for optional resizing
- Adds post_process_semantic_segmentation and post_process_instance_segmentation methods.
- Adds a deprecation warning to post_process_segmentation method in favour of post_process_instance_segmentation
2022-10-05 15:27:15 +03:00
Yih-Dar
b03be78a4b
Fix test_inference_instance_segmentation_head
( #17872 )
...
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-06-24 19:36:45 +02:00
Yih-Dar
494aac65a7
Skip test_multi_gpu_data_parallel_forward
for MaskFormer
( #17864 )
...
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-06-24 19:35:00 +02:00
Yih-Dar
19420fd99e
Move test model folders ( #17034 )
...
* move test model folders (TODO: fix imports and others)
* fix (potentially partially) imports (in model test modules)
* fix (potentially partially) imports (in tokenization test modules)
* fix (potentially partially) imports (in feature extraction test modules)
* fix import utils.test_modeling_tf_core
* fix path ../fixtures/
* fix imports about generation.test_generation_flax_utils
* fix more imports
* fix fixture path
* fix get_test_dir
* update module_to_test_file
* fix get_tests_dir from wrong transformers.utils
* update config.yml (CircleCI)
* fix style
* remove missing imports
* update new model script
* update check_repo
* update SPECIAL_MODULE_TO_TEST_MAP
* fix style
* add __init__
* update self-scheduled
* fix add_new_model scripts
* check one way to get location back
* python setup.py build install
* fix import in test auto
* update self-scheduled.yml
* update slack notification script
* Add comments about artifact names
* fix for yolos
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-05-03 14:42:02 +02:00