File tree Expand file tree Collapse file tree 4 files changed +5
-2
lines changed
onnx_diagnostic/torch_models Expand file tree Collapse file tree 4 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ Change Logs
440.4.0
55+++++
66
7+ * :pr: `65 `: support SlidingWindowCache
78* :pr: `63 `: support option ``--trained ``
89* :pr: `61 `: improves dynamic shapes for EncoderDecoderCache
910* :pr: `58 `: add function use_dyn_not_str to replace string by ``torch.export.Dim.DYNAMIC ``,
Original file line number Diff line number Diff line change 123123 ("py:class" , "transformers.cache_utils.DynamicCache" ),
124124 ("py:class" , "transformers.cache_utils.EncoderDecoderCache" ),
125125 ("py:class" , "transformers.cache_utils.MambaCache" ),
126+ ("py:class" , "transformers.cache_utils.SlidingWindowCache" ),
126127 ("py:class" , "transformers.configuration_utils.PretrainedConfig" ),
127128 ("py:func" , "torch.export._draft_export.draft_export" ),
128129 ("py:func" , "torch._export.tools.report_exportability" ),
Original file line number Diff line number Diff line change 11import unittest
22import torch
33import transformers
4- from onnx_diagnostic .ext_test_case import ExtTestCase
4+ from onnx_diagnostic .ext_test_case import ExtTestCase , requires_transformers
55from onnx_diagnostic .helpers import string_type
66from onnx_diagnostic .helpers .cache_helper import (
77 flatten_unflatten_for_dynamic_shapes ,
@@ -134,6 +134,7 @@ def test_unflatten_flatten_encoder_decoder_cache(self):
134134 self .string_type (c2 , with_shape = True ),
135135 )
136136
137+ @requires_transformers ("4.51" ) # the structure changes
137138 def test_make_mamba_cache (self ):
138139 cache = make_mamba_cache (
139140 [
Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ def validate_model(
346346
347347 for k in ["task" , "size" , "n_weights" ]:
348348 summary [f"model_{ k .replace ('_' ,'' )} " ] = data [k ]
349- summary ["model_inputs_opionts" ] = input_options or ""
349+ summary ["model_inputs_opionts" ] = str ( input_options or "" )
350350 summary ["model_inputs" ] = string_type (data ["inputs" ], with_shape = True )
351351 summary ["model_shapes" ] = string_type (str (data ["dynamic_shapes" ]))
352352 summary ["model_class" ] = data ["model" ].__class__ .__name__
You can’t perform that action at this time.
0 commit comments