Sai-Suraj-27
12b6880c81
fix: Fixed raising TypeError
instead of ValueError
for invalid type ( #32111 )
...
* Raised TypeError instead of ValueError for invalid types.
* Updated formatting using ruff.
* Retrieved few changes.
* Retrieved few changes.
* Updated tests accordingly.
2024-07-22 17:46:17 +01:00
Billy Cao
ac26260436
Allow FP16 or other precision inference for Pipelines ( #31342 )
...
* cast image features to model.dtype where needed to support FP16 or other precision in pipelines
* Update src/transformers/pipelines/image_feature_extraction.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Use .to instead
* Add FP16 pipeline support for zeroshot audio classification
* Remove unused torch imports
* Add docs on FP16 pipeline
* Remove unused import
* Add FP16 tests to pipeline mixin
* Add fp16 placeholder for mask_generation pipeline test
* Add FP16 tests for all pipelines
* Fix formatting
* Remove torch_dtype arg from is_pipeline_test_to_skip*
* Fix format
* trigger ci
---------
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
2024-07-05 17:21:50 +01:00
amyeroberts
1de7dc7403
Skip tests properly ( #31308 )
...
* Skip tests properly
* [test_all]
* Add 'reason' as kwarg for skipTest
* [test_all] Fix up
* [test_all]
2024-06-26 21:59:08 +01:00
Matt
065729a692
Remove ConversationalPipeline and Conversation object ( #31165 )
...
* Remove ConversationalPipeline and Conversation object, as they have been deprecated for some time and are due for removal
* Update not-doctested.txt
* Fix JA and ZH docs
* Fix JA and ZH docs some more
* Fix JA and ZH docs some more
2024-06-07 17:50:18 +01:00
amyeroberts
ba3264b4e8
Image Feature Extraction pipeline ( #28216 )
...
* Draft pipeline
* Fixup
* Fix docstrings
* Update doctest
* Update pipeline_model_mapping
* Update docstring
* Update tests
* Update src/transformers/pipelines/image_feature_extraction.py
Co-authored-by: Omar Sanseviero <osanseviero@gmail.com>
* Fix docstrings - review comments
* Remove pipeline mapping for composite vision models
* Add to pipeline tests
* Remove for flava (multimodal)
* safe pil import
* Add requirements for pipeline run
* Account for super slow efficientnet
* Review comments
* Fix tests
* Swap order of kwargs
* Use build_pipeline_init_args
* Add back FE pipeline for Vilt
* Include image_processor_kwargs in docstring
* Mark test as flaky
* Update TODO
* Update tests/pipelines/test_pipelines_image_feature_extraction.py
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* Add license header
---------
Co-authored-by: Omar Sanseviero <osanseviero@gmail.com>
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
2024-02-05 14:50:07 +00:00
Matt
08fadc8085
Shorten the conversation tests for speed + fixing position overflows ( #26960 )
...
* Shorten the conversation tests for speed + fixing position overflows
* Put max_new_tokens back to 5
* Remove test skips
* Increase max_position_embeddings in blenderbot tests
* Add skips for blenderbot_small
* Correct TF test skip
* make fixup
* Reformat skips to use is_pipeline_test_to_skip
* Update tests/models/blenderbot_small/test_modeling_blenderbot_small.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update tests/models/blenderbot_small/test_modeling_flax_blenderbot_small.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update tests/models/blenderbot_small/test_modeling_tf_blenderbot_small.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
---------
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
2023-10-31 14:20:04 +00:00
Matt
bdbcd5d482
Fix and re-enable ConversationalPipeline tests ( #26907 )
...
* Fix and re-enable conversationalpipeline tests
* Fix the batch test so the change only applies to conversational pipeline
2023-10-19 12:04:25 +01:00
Matt
de55ead1f1
Emergency PR to skip conversational tests to fix CI ( #26906 )
2023-10-18 15:33:43 +01:00
Yih-Dar
e840aa67e8
Fix failing MusicgenTest .test_pipeline_text_to_audio
( #26586 )
...
* fix
* fix
* Fix
* Fix
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-10-06 15:53:59 +02:00
LeviVasconcelos
576cd45a57
Add image to image pipeline ( #25393 )
...
* Add image to image pipeline
Add image to image pipeline
* remove swin2sr from tf auto
* make ImageToImage importable
* make style
make style
make style
make style
* remove tf support
* remove nonused imports
* fix postprocessing
* add important comments; add unit tests
* add documentation
* remove support for TF
* make fixup
* fix typehint Image.Image
* fix documentation code
* address review request; fix unittest type checking
* address review request; fix unittest type checking
* make fixup
* address reviews
* Update src/transformers/pipelines/image_to_image.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* enhance docs
* make style
* make style
* improve docetest time
* improve docetest time
* Update tests/pipelines/test_pipelines_image_to_image.py
Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
* Update tests/pipelines/test_pipelines_image_to_image.py
Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
* make fixup
* undo faulty merge
* undo faulty merge
* add image-to-image to test pipeline mixin
* Update src/transformers/pipelines/image_to_image.py
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* Update tests/pipelines/test_pipelines_image_to_image.py
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* improve docs
---------
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
2023-09-22 19:53:55 +03:00
Yoach Lacombe
b8f69d0d10
Add Text-To-Speech pipeline ( #24952 )
...
* add AutoModelForTextToSpeech class
* add TTS pipeline and tessting
* add docstrings to text_to_speech pipeline
* fix torch dependency
* corrector 'processor is None' case in Pipeline
* correct repo id
* modify text-to-speech -> text-to-audio
* remove processor
* rename text_to_speech pipelines files to text_audio
* add textToWaveform and textToSpectrogram instead of textToAudio classes
* update TTS pipeline to the bare minimum
* update tests TTS pipeline
* make style and erase useless import torch in TTS pipeline tests
* modify how to check if generate or forward in TTS pipeline
* remove unnecessary extra new lines
* Apply suggestions from code review
Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
* refactor input_texts -> text_inputs
* correct docstrings of TTS.__call__
* correct the shape of generated waveform
* take care of Bark tokenizer special case
* correct run_pipeline_test TTS
* make style
* update TTS docstrings
* address Sylvain nit refactors
* make style
* refactor into one liners
* correct squeeze
* correct way to test if forward or generate
* Update output audio waveform shape
* make style
* correct import
* modify how the TTS pipeline test if a model can generate
* align shape output of TTS pipeline with consistent shape
---------
Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
2023-08-17 17:34:47 +01:00
Yih-Dar
c23d131eab
Update tiny models for pipeline testing. ( #24364 )
...
* fix
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-06-20 14:43:10 +02:00
Yih-Dar
ffad4f1373
Update tiny models and pipeline tests ( #23446 )
...
* fix
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-05-18 17:29:04 +02:00
Yih-Dar
975159bb61
Update tiny models and a few fixes ( #22928 )
...
* run_check_tiny_models
* update summary
* update mixin
* update pipeline_model_mapping
* update pipeline_model_mapping
* Update for gpt_bigcode
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-04-24 14:45:22 +02:00
Yih-Dar
32b08742a5
DocumentQuestionAnsweringPipeline
only for fast ⚡ tokenizers ( #22745 )
...
* fix
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-04-13 17:22:59 +02:00
Yih-Dar
2c22bc79c2
Make tiny model creation + pipeline testing more robust ( #22500 )
...
* Final Tiny things
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-04-06 17:45:55 +02:00
Yih-Dar
e8cc02555e
Automatically create/update tiny models ( #22275 )
...
* Automatically create or update tiny models
* Skip failed tests
* update workflow file
* use revision
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-03-23 19:14:17 +01:00
Yih-Dar
8b05ace014
Fix PipelineTests skip conditions ( #22320 )
...
* check what tests fail
* Skip failing tests
* Skip failing tests
* Skip failing tests
* Skip failing tests
* clean up
* clean up
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-03-22 20:02:24 +01:00
Yih-Dar
6c2ad00c46
Move is_pipeline_test_to_skip
to specific model test classes ( #21999 )
...
* Move `is_pipeline_test_to_skip` to specific model test classes
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-03-14 10:03:02 +01:00
Yih-Dar
9f5bfe1b99
Avoid modeling tests run in pipeline CI jobs ( #21911 )
...
* rework is_pipeline_test
* bring back 3 tests
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-03-02 21:23:06 +01:00
Sylvain Gugger
50a8ed3ee0
Mark pipeline tests to skip them easily ( #21887 )
...
* Mark pipeline tests to skip them easily
* Mark the mixin as pipeline test
* Update src/transformers/testing_utils.py
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
---------
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
2023-03-02 10:55:36 -05:00
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