Skip to content

Commit 1158eca

Browse files
authored
switch to 4.53.3 on CI (#193)
* switch to 4.53.3 on CI * cache a config file * action * lower atol
1 parent ad93117 commit 1158eca

File tree

6 files changed

+239
-4
lines changed

6 files changed

+239
-4
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
matrix:
1717
os: [ubuntu-latest]
1818
python: ['3.10', '3.11', '3.12', '3.13']
19-
transformers: ['4.48.3', '4.51.3', '4.52.4', '4.53.1', 'main']
19+
transformers: ['4.48.3', '4.51.3', '4.52.4', '4.53.3', 'main']
2020
torch: ['2.7', 'main']
2121
exclude:
2222
- python: '3.10'
@@ -28,7 +28,7 @@ jobs:
2828
- python: '3.10'
2929
transformers: 'main'
3030
- python: '3.11'
31-
transformers: '4.53.1'
31+
transformers: '4.53.3'
3232
- python: '3.11'
3333
transformers: 'main'
3434
- python: '3.13'

.github/workflows/documentation.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ jobs:
2424
with:
2525
python-version: ${{ matrix.python }}
2626

27-
- uses: tlylt/install-graphviz@v1
27+
- name: install graphviz
28+
uses: ts-graphviz/setup-graphviz@v2
2829

2930
- name: Install pandoc
3031
run: sudo apt-get install -y pandoc

CHANGELOGS.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Change Logs
44
0.7.6
55
+++++
66

7+
* :pr:`193`: validates with 4.53.3
8+
* :pr:`189`: support for task mask-generation
79
* :pr:`192`: add support for Gemma-3, add serialization for HybridCache,
810
changes to support ``transformers>=4.54``
911

_doc/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ def linkcode_resolve(domain, info):
119119
("py:class", "False"),
120120
("py:class", "True"),
121121
("py:class", "Argument"),
122+
("py:class", "CacheProcessor"),
122123
("py:class", "default=sklearn.utils.metadata_routing.UNCHANGED"),
123124
("py:class", "diffusers.models.unets.unet_2d_condition.UNet2DConditionOutput"),
124125
("py:class", "ModelProto"),
@@ -142,6 +143,7 @@ def linkcode_resolve(domain, info):
142143
("py:class", "transformers.cache_utils.EncoderDecoderCache"),
143144
("py:class", "transformers.cache_utils.HybridCache"),
144145
("py:class", "transformers.cache_utils.MambaCache"),
146+
("py:class", "transformers.models.mamba.modeling_mamba.MambaCache"),
145147
("py:class", "transformers.cache_utils.SlidingWindowCache"),
146148
("py:class", "transformers.cache_utils.StaticCache"),
147149
("py:class", "transformers.configuration_utils.PretrainedConfig"),

_unittests/ut_torch_onnx/test_sbs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def forward(self, x):
7878
onx,
7979
(x,),
8080
check_conversion_cls=dict(
81-
cls=ExtendedReferenceEvaluator, atol=1e-5, rtol=1e-5
81+
cls=ExtendedReferenceEvaluator, atol=1e-4, rtol=1e-4
8282
),
8383
verbose=1,
8484
),

onnx_diagnostic/torch_models/hghub/hub_data_cached_configs.py

Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,6 +1366,236 @@ def _ccached_fxmarty_tiny_random_gemmaforcausallm():
13661366
)
13671367

13681368

1369+
def _ccached_fxmarty_sam_vit_tiny_random():
1370+
"fxmarty/sam-vit-tiny-random"
1371+
return transformers.SamConfig(
1372+
**{
1373+
"_commit_hash": "a7c34ea5d2b33a3bc34d34dc9a7b2417c0eaa809",
1374+
"_name_or_path": "facebook/sam-vit-base",
1375+
"architectures": ["SamModel"],
1376+
"initializer_range": 0.02,
1377+
"mask_decoder_config": {
1378+
"_name_or_path": "",
1379+
"add_cross_attention": false,
1380+
"architectures": null,
1381+
"attention_downsample_rate": 2,
1382+
"bad_words_ids": null,
1383+
"begin_suppress_tokens": null,
1384+
"bos_token_id": null,
1385+
"chunk_size_feed_forward": 0,
1386+
"cross_attention_hidden_size": null,
1387+
"decoder_start_token_id": null,
1388+
"diversity_penalty": 0.0,
1389+
"do_sample": false,
1390+
"early_stopping": false,
1391+
"encoder_no_repeat_ngram_size": 0,
1392+
"eos_token_id": null,
1393+
"exponential_decay_length_penalty": null,
1394+
"finetuning_task": null,
1395+
"forced_bos_token_id": null,
1396+
"forced_eos_token_id": null,
1397+
"hidden_act": "relu",
1398+
"hidden_size": 32,
1399+
"id2label": {"0": "LABEL_0", "1": "LABEL_1"},
1400+
"iou_head_depth": 3,
1401+
"iou_head_hidden_dim": 256,
1402+
"is_decoder": false,
1403+
"is_encoder_decoder": false,
1404+
"label2id": {"LABEL_0": 0, "LABEL_1": 1},
1405+
"layer_norm_eps": 1e-06,
1406+
"length_penalty": 1.0,
1407+
"max_length": 20,
1408+
"min_length": 0,
1409+
"mlp_dim": 2048,
1410+
"model_type": "",
1411+
"no_repeat_ngram_size": 0,
1412+
"num_attention_heads": 8,
1413+
"num_beam_groups": 1,
1414+
"num_beams": 1,
1415+
"num_hidden_layers": 2,
1416+
"num_multimask_outputs": 3,
1417+
"num_return_sequences": 1,
1418+
"output_attentions": false,
1419+
"output_hidden_states": false,
1420+
"output_scores": false,
1421+
"pad_token_id": null,
1422+
"prefix": null,
1423+
"problem_type": null,
1424+
"pruned_heads": {},
1425+
"remove_invalid_values": false,
1426+
"repetition_penalty": 1.0,
1427+
"return_dict": true,
1428+
"return_dict_in_generate": false,
1429+
"sep_token_id": null,
1430+
"suppress_tokens": null,
1431+
"task_specific_params": null,
1432+
"temperature": 1.0,
1433+
"tf_legacy_loss": false,
1434+
"tie_encoder_decoder": false,
1435+
"tie_word_embeddings": true,
1436+
"tokenizer_class": null,
1437+
"top_k": 50,
1438+
"top_p": 1.0,
1439+
"torch_dtype": null,
1440+
"torchscript": false,
1441+
"transformers_version": "4.29.0.dev0",
1442+
"typical_p": 1.0,
1443+
"use_bfloat16": false,
1444+
},
1445+
"model_type": "sam",
1446+
"prompt_encoder_config": {
1447+
"_name_or_path": "",
1448+
"add_cross_attention": false,
1449+
"architectures": null,
1450+
"bad_words_ids": null,
1451+
"begin_suppress_tokens": null,
1452+
"bos_token_id": null,
1453+
"chunk_size_feed_forward": 0,
1454+
"cross_attention_hidden_size": null,
1455+
"decoder_start_token_id": null,
1456+
"diversity_penalty": 0.0,
1457+
"do_sample": false,
1458+
"early_stopping": false,
1459+
"encoder_no_repeat_ngram_size": 0,
1460+
"eos_token_id": null,
1461+
"exponential_decay_length_penalty": null,
1462+
"finetuning_task": null,
1463+
"forced_bos_token_id": null,
1464+
"forced_eos_token_id": null,
1465+
"hidden_act": "gelu",
1466+
"hidden_size": 32,
1467+
"id2label": {"0": "LABEL_0", "1": "LABEL_1"},
1468+
"image_embedding_size": 64,
1469+
"image_size": 1024,
1470+
"is_decoder": false,
1471+
"is_encoder_decoder": false,
1472+
"label2id": {"LABEL_0": 0, "LABEL_1": 1},
1473+
"layer_norm_eps": 1e-06,
1474+
"length_penalty": 1.0,
1475+
"mask_input_channels": 16,
1476+
"max_length": 20,
1477+
"min_length": 0,
1478+
"model_type": "",
1479+
"no_repeat_ngram_size": 0,
1480+
"num_beam_groups": 1,
1481+
"num_beams": 1,
1482+
"num_point_embeddings": 4,
1483+
"num_return_sequences": 1,
1484+
"output_attentions": false,
1485+
"output_hidden_states": false,
1486+
"output_scores": false,
1487+
"pad_token_id": null,
1488+
"patch_size": 16,
1489+
"prefix": null,
1490+
"problem_type": null,
1491+
"pruned_heads": {},
1492+
"remove_invalid_values": false,
1493+
"repetition_penalty": 1.0,
1494+
"return_dict": true,
1495+
"return_dict_in_generate": false,
1496+
"sep_token_id": null,
1497+
"suppress_tokens": null,
1498+
"task_specific_params": null,
1499+
"temperature": 1.0,
1500+
"tf_legacy_loss": false,
1501+
"tie_encoder_decoder": false,
1502+
"tie_word_embeddings": true,
1503+
"tokenizer_class": null,
1504+
"top_k": 50,
1505+
"top_p": 1.0,
1506+
"torch_dtype": null,
1507+
"torchscript": false,
1508+
"transformers_version": "4.29.0.dev0",
1509+
"typical_p": 1.0,
1510+
"use_bfloat16": false,
1511+
},
1512+
"torch_dtype": "float32",
1513+
"transformers_version": null,
1514+
"vision_config": {
1515+
"_name_or_path": "",
1516+
"add_cross_attention": false,
1517+
"architectures": null,
1518+
"attention_dropout": 0.0,
1519+
"bad_words_ids": null,
1520+
"begin_suppress_tokens": null,
1521+
"bos_token_id": null,
1522+
"chunk_size_feed_forward": 0,
1523+
"cross_attention_hidden_size": null,
1524+
"decoder_start_token_id": null,
1525+
"diversity_penalty": 0.0,
1526+
"do_sample": false,
1527+
"dropout": 0.0,
1528+
"early_stopping": false,
1529+
"encoder_no_repeat_ngram_size": 0,
1530+
"eos_token_id": null,
1531+
"exponential_decay_length_penalty": null,
1532+
"finetuning_task": null,
1533+
"forced_bos_token_id": null,
1534+
"forced_eos_token_id": null,
1535+
"global_attn_indexes": [2, 5, 8, 11],
1536+
"hidden_act": "gelu",
1537+
"hidden_size": 96,
1538+
"id2label": {"0": "LABEL_0", "1": "LABEL_1"},
1539+
"image_size": 1024,
1540+
"initializer_factor": 1.0,
1541+
"initializer_range": 1e-10,
1542+
"intermediate_size": 768,
1543+
"is_decoder": false,
1544+
"is_encoder_decoder": false,
1545+
"label2id": {"LABEL_0": 0, "LABEL_1": 1},
1546+
"layer_norm_eps": 1e-06,
1547+
"length_penalty": 1.0,
1548+
"max_length": 20,
1549+
"min_length": 0,
1550+
"mlp_dim": 384,
1551+
"mlp_ratio": 4.0,
1552+
"model_type": "",
1553+
"no_repeat_ngram_size": 0,
1554+
"num_attention_heads": 1,
1555+
"num_beam_groups": 1,
1556+
"num_beams": 1,
1557+
"num_channels": 3,
1558+
"num_hidden_layers": 12,
1559+
"num_pos_feats": 16,
1560+
"num_return_sequences": 1,
1561+
"output_attentions": false,
1562+
"output_channels": 32,
1563+
"output_hidden_states": false,
1564+
"output_scores": false,
1565+
"pad_token_id": null,
1566+
"patch_size": 16,
1567+
"prefix": null,
1568+
"problem_type": null,
1569+
"projection_dim": 64,
1570+
"pruned_heads": {},
1571+
"qkv_bias": true,
1572+
"remove_invalid_values": false,
1573+
"repetition_penalty": 1.0,
1574+
"return_dict": true,
1575+
"return_dict_in_generate": false,
1576+
"sep_token_id": null,
1577+
"suppress_tokens": null,
1578+
"task_specific_params": null,
1579+
"temperature": 1.0,
1580+
"tf_legacy_loss": false,
1581+
"tie_encoder_decoder": false,
1582+
"tie_word_embeddings": true,
1583+
"tokenizer_class": null,
1584+
"top_k": 50,
1585+
"top_p": 1.0,
1586+
"torch_dtype": null,
1587+
"torchscript": false,
1588+
"transformers_version": "4.29.0.dev0",
1589+
"typical_p": 1.0,
1590+
"use_abs_pos": true,
1591+
"use_bfloat16": false,
1592+
"use_rel_pos": true,
1593+
"window_size": 14,
1594+
},
1595+
}
1596+
)
1597+
1598+
13691599
def _ccached_hf_internal_testing_tiny_random_gptneoxforcausallm():
13701600
"hf-internal-testing/tiny-random-GPTNeoXForCausalLM"
13711601
return transformers.GPTNeoXConfig(

0 commit comments

Comments
 (0)