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
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
0dde58978a
Rename test_feature_extraction files ( #21140 )
...
* Rename files
* Update file names in tests
2023-01-17 14:04:07 +00: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
amyeroberts
a95fd35426
Vision processors - replace FE with IPs ( #20590 )
...
* Replace FE references with IPs
* Update processor tests
* Update src/transformers/models/clip/processing_clip.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/clip/processing_clip.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update warning messages v4.27 -> v5
* Fixup
* Update Chinese CLIP processor
* Add feature_extractor property
* Add attributes
* Add tests
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-12-09 10:48:34 +00:00
Yang An
721764028e
Add Chinese-CLIP implementation ( #20368 )
...
* init chinese-clip model from clip
* init model tests and docs
* implement chinese-clip into hf
* implement chinese-clip into hf
* implement chinese-clip into hf
* implement chinese-clip into hf
* implement chinese-clip into hf
* update usecase example in model implementation
* fix codestyle
* fix model_type typo in readme
* add placeholder in doc
* add placeholder in doc
* update the init script
* update usecase
* fix codestyle
* update testcase
* update testcase
* update testcase
* update testcase
* update testcase
* update testcase
* update testcase
* update testcase
* update testcase
* update testcase
* update testcase
* update testcase
* forward the convert_rgb
* update testcase
* update testcase
* update testcase
* merge the recent update from clip about model_input_name property
* update the doc
* update the doc
* update the doc
* update the doc
* remove unused imports
* reformat code style
* update the doc
* fix isort style
* bypass a weird failed unit test which is unrelated with my PR
* update the doc
* implement independent vision config class
* implement independent vision model class
* fix refactor bug
* fix refactor bug
* fix refactor bug
* make style
* fix refactor bug
* make style
* fix refactor bug
* fix refactor bug
* make style
* fix refactor bug
* fix refactor bug
* doc-build restyle
* implement independent text config class
* implement independent text model class
* implement independent text model class
* make style
* make fix-copies
* fix refactor bug
* fix refactor bug
* fix refactor bug
* fix refactor bug
* fix refactor bug
* fix refactor bug
* fix refactor bug
* fix refactor bug
* fix refactor bug
* fix refactor bug
* make style
* update doc
* black and isort
* update doc
* Update src/transformers/models/chinese_clip/configuration_chinese_clip.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/auto/tokenization_auto.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* modify the model type from chinese-clip to chinese_clip
* format the example comment of ChineseCLIPVisionConfig
* correct the copyright comment
* fix the tokenizer specification
* add copied from for loss function
* remove unused class
* update CHINESE_CLIP_TEXT_INPUTS_DOCSTRING
* update CHINESE_CLIP_INPUTS_DOCSTRING
* update doc
* update doc
* update code comment in config
* update copied from statement
* make style
* rename the doc file
* add copied statement
* remove unused attention_mask, causal_attention_mask in ChineseCLIPVisionEncoder
* remove ChineseCLIPTextPreTrainedModel
* fix bug
* fix bug
* fix bug
* update doc
* make style
* Update src/transformers/models/chinese_clip/configuration_chinese_clip.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/chinese_clip/configuration_chinese_clip.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* update ChineseCLIPImageProcessor in image_processing_auto
* fix config_class of chinesecliptextmodel
* fix the test case
* update the docs
* remove the copied from comment for ChineseCLIPTextModel, since it has diverged from BertModel with customed config_class
* update the testcase
* final fix
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-11-30 19:22:23 +01:00