|
1 | 1 | import io |
2 | 2 | import functools |
| 3 | +from typing import Dict, List |
3 | 4 |
|
4 | 5 | __date__ = "2025-03-26" |
5 | 6 |
|
6 | | -__data_tasks__ = [ |
7 | | - "automatic-speech-recognition", |
8 | | - "image-text-to-text", |
9 | | - "image-to-text", |
10 | | - "text-generation", |
11 | | - "object-detection", |
12 | | - "document-question-answering", |
13 | | - "feature-extraction", |
14 | | - "text-to-audio", |
15 | | - "zero-shot-image-classification", |
16 | | - "image-segmentation", |
17 | | - "reinforcement-learning", |
18 | | - "no-pipeline-tag", |
19 | | - "image-classification", |
20 | | - "text2text-generation", |
21 | | - "mask-generation", |
22 | | - "keypoint-detection", |
23 | | - "audio-classification", |
24 | | - "image-feature-extraction", |
25 | | - "fill-mask", |
26 | | -] |
27 | | - |
28 | 7 | __data_arch__ = """ |
29 | 8 | architecture,task |
30 | 9 | ASTModel,feature-extraction |
|
143 | 122 | YolosModel,image-feature-extraction |
144 | 123 | """ |
145 | 124 |
|
| 125 | +__data_tasks__ = [ |
| 126 | + "automatic-speech-recognition", |
| 127 | + "image-text-to-text", |
| 128 | + "image-to-text", |
| 129 | + "text-generation", |
| 130 | + "object-detection", |
| 131 | + "document-question-answering", |
| 132 | + "feature-extraction", |
| 133 | + "text-to-audio", |
| 134 | + "zero-shot-image-classification", |
| 135 | + "image-segmentation", |
| 136 | + "reinforcement-learning", |
| 137 | + "no-pipeline-tag", |
| 138 | + "image-classification", |
| 139 | + "text2text-generation", |
| 140 | + "mask-generation", |
| 141 | + "keypoint-detection", |
| 142 | + "audio-classification", |
| 143 | + "image-feature-extraction", |
| 144 | + "fill-mask", |
| 145 | +] |
| 146 | + |
| 147 | +__models_testing__ = """ |
| 148 | +hf-internal-testing/tiny-random-BeitForImageClassification |
| 149 | +hf-internal-testing/tiny-random-convnext |
| 150 | +fxmarty/tiny-random-GemmaForCausalLM |
| 151 | +hf-internal-testing/tiny-random-GPTNeoXForCausalLM |
| 152 | +hf-internal-testing/tiny-random-GraniteForCausalLM |
| 153 | +hf-internal-testing/tiny-random-HieraForImageClassification |
| 154 | +fxmarty/tiny-llama-fast-tokenizer |
| 155 | +sshleifer/tiny-marian-en-de |
| 156 | +hf-internal-testing/tiny-random-MaskFormerForInstanceSegmentation |
| 157 | +echarlaix/tiny-random-mistral |
| 158 | +hf-internal-testing/tiny-random-mobilevit |
| 159 | +hf-internal-testing/tiny-random-MoonshineForConditionalGeneration |
| 160 | +hf-internal-testing/tiny-random-OlmoForCausalLM |
| 161 | +hf-internal-testing/tiny-random-Olmo2ForCausalLM |
| 162 | +echarlaix/tiny-random-PhiForCausalLM |
| 163 | +Xenova/tiny-random-Phi3ForCausalLM |
| 164 | +fxmarty/pix2struct-tiny-random |
| 165 | +fxmarty/tiny-dummy-qwen2 |
| 166 | +hf-internal-testing/tiny-random-ViTMSNForImageClassification |
| 167 | +hf-internal-testing/tiny-random-YolosModel |
| 168 | +hf-internal-testing/tiny-xlm-roberta |
| 169 | +""" |
| 170 | + |
| 171 | + |
| 172 | +@functools.cache |
| 173 | +def load_models_testing() -> List[str]: |
| 174 | + """Returns model ids for testing.""" |
| 175 | + return [_.strip() for _ in __models_testing__.split("\n") if _.strip()] |
| 176 | + |
146 | 177 |
|
147 | 178 | @functools.cache |
148 | | -def load_architecture_task(): |
| 179 | +def load_architecture_task() -> Dict[str, str]: |
149 | 180 | """ |
150 | 181 | Returns a dictionary mapping architecture to task. |
151 | 182 |
|
|
0 commit comments