onnx-diagnostic 0.8.10__py3-none-any.whl → 0.9.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. onnx_diagnostic/__init__.py +1 -1
  2. onnx_diagnostic/_command_lines_parser.py +136 -140
  3. onnx_diagnostic/ci_models/data/Blanca_Lake_Hudak.jpg +0 -0
  4. onnx_diagnostic/ci_models/data/Ice_worm_glacier.jpg +0 -0
  5. onnx_diagnostic/ci_models/data/__init__.py +0 -0
  6. onnx_diagnostic/ci_models/export_phi4_mm.py +10 -7
  7. onnx_diagnostic/export/api.py +13 -4
  8. onnx_diagnostic/export/dynamic_shapes.py +1 -1
  9. onnx_diagnostic/export/validate.py +2 -0
  10. onnx_diagnostic/ext_test_case.py +32 -15
  11. onnx_diagnostic/helpers/args_helper.py +1 -0
  12. onnx_diagnostic/helpers/bench_run.py +0 -1
  13. onnx_diagnostic/helpers/cache_helper.py +102 -36
  14. onnx_diagnostic/helpers/doc_helper.py +7 -4
  15. onnx_diagnostic/helpers/graph_helper.py +6 -6
  16. onnx_diagnostic/helpers/helper.py +39 -0
  17. onnx_diagnostic/helpers/log_helper.py +37 -14
  18. onnx_diagnostic/helpers/memory_peak.py +5 -1
  19. onnx_diagnostic/helpers/mini_onnx_builder.py +9 -14
  20. onnx_diagnostic/helpers/model_builder_helper.py +1 -1
  21. onnx_diagnostic/helpers/onnx_helper.py +283 -110
  22. onnx_diagnostic/helpers/ort_session.py +5 -2
  23. onnx_diagnostic/helpers/rt_helper.py +53 -9
  24. onnx_diagnostic/helpers/torch_helper.py +15 -11
  25. onnx_diagnostic/investigate/__init__.py +0 -0
  26. onnx_diagnostic/investigate/input_observer.py +970 -0
  27. onnx_diagnostic/reference/evaluator.py +0 -1
  28. onnx_diagnostic/reference/ort_evaluator.py +0 -1
  29. onnx_diagnostic/reference/report_results_comparison.py +9 -3
  30. onnx_diagnostic/reference/torch_evaluator.py +5 -1
  31. onnx_diagnostic/reference/torch_ops/_op_run.py +3 -5
  32. onnx_diagnostic/reference/torch_ops/sequence_ops.py +1 -1
  33. onnx_diagnostic/tasks/feature_extraction.py +0 -1
  34. onnx_diagnostic/torch_export_patches/__init__.py +0 -1
  35. onnx_diagnostic/torch_export_patches/onnx_export_errors.py +32 -14
  36. onnx_diagnostic/torch_export_patches/patch_module.py +1 -1
  37. onnx_diagnostic/torch_export_patches/patches/_patch_transformers_masking_utils.py +107 -6
  38. onnx_diagnostic/torch_export_patches/patches/_patch_transformers_rotary_embedding.py +2 -2
  39. onnx_diagnostic/torch_export_patches/patches/patch_torch.py +13 -3
  40. onnx_diagnostic/torch_export_patches/patches/patch_transformers.py +1 -0
  41. onnx_diagnostic/torch_export_patches/serialization/transformers_impl.py +70 -23
  42. onnx_diagnostic/torch_models/code_sample.py +5 -10
  43. onnx_diagnostic/torch_models/hghub/hub_data.py +2 -4
  44. onnx_diagnostic/torch_models/hghub/hub_data_cached_configs.py +6 -12
  45. onnx_diagnostic/torch_models/validate.py +1 -1
  46. onnx_diagnostic/torch_onnx/compare.py +0 -1
  47. onnx_diagnostic/torch_onnx/runtime_info.py +1 -1
  48. onnx_diagnostic/torch_onnx/sbs.py +1 -1
  49. onnx_diagnostic/torch_onnx/sbs_dataclasses.py +2 -4
  50. onnx_diagnostic/typing.py +15 -0
  51. {onnx_diagnostic-0.8.10.dist-info → onnx_diagnostic-0.9.0.dist-info}/METADATA +2 -2
  52. {onnx_diagnostic-0.8.10.dist-info → onnx_diagnostic-0.9.0.dist-info}/RECORD +55 -50
  53. {onnx_diagnostic-0.8.10.dist-info → onnx_diagnostic-0.9.0.dist-info}/WHEEL +1 -1
  54. onnx_diagnostic/api.py +0 -15
  55. {onnx_diagnostic-0.8.10.dist-info → onnx_diagnostic-0.9.0.dist-info}/licenses/LICENSE.txt +0 -0
  56. {onnx_diagnostic-0.8.10.dist-info → onnx_diagnostic-0.9.0.dist-info}/top_level.txt +0 -0
@@ -194,8 +194,7 @@ def _ccached_hf_internal_testing_tiny_random_beitforimageclassification():
194
194
 
195
195
  def _ccached_hf_internal_testing_tiny_random_convnext():
196
196
  "hf-internal-testing/tiny-random-convnext"
197
- t64 = textwrap.dedent(
198
- """
197
+ t64 = textwrap.dedent("""
199
198
  ewogICJhcmNoaXRlY3R1cmVzIjogWwogICAgIkNvbnZOZXh0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiIKI
200
199
  CBdLAogICJkZXB0aHMiOiBbCiAgICAzLAogICAgMywKICAgIDksCiAgICAzCiAgXSwKICAiZHJvcF9wYX
201
200
  RoX3JhdGUiOiAwLjAsCiAgImhpZGRlbl9hY3QiOiAiZ2VsdSIsCiAgImhpZGRlbl9zaXplcyI6IFsKICA
@@ -1345,8 +1344,7 @@ def _ccached_hf_internal_testing_tiny_random_convnext():
1345
1344
  F0Y2hfc2l6ZSI6IDQsCiAgInN0YWdlX25hbWVzIjogWwogICAgInN0ZW0iLAogICAgInN0YWdlMSIsCiA
1346
1345
  gICAic3RhZ2UyIiwKICAgICJzdGFnZTMiLAogICAgInN0YWdlNCIKICBdLAogICJ0b3JjaF9kdHlwZSI6
1347
1346
  ICJmbG9hdDMyIiwKICAidHJhbnNmb3JtZXJzX3ZlcnNpb24iOiAiNC41MS4wLmRldjAiCn0K
1348
- """.strip()
1349
- )
1347
+ """.strip())
1350
1348
  js = base64.b64decode(t64.encode("utf-8"))
1351
1349
  kwargs = json.loads(js)
1352
1350
  return transformers.ConvNextConfig(**kwargs)
@@ -1817,8 +1815,7 @@ def _ccached_sshleifer_tiny_marian_en_de():
1817
1815
 
1818
1816
  def _ccached_hf_internal_testing_tiny_random_maskformerforinstancesegmentation():
1819
1817
  "hf-internal-testing/tiny-random-MaskFormerForInstanceSegmentation"
1820
- t64 = textwrap.dedent(
1821
- """
1818
+ t64 = textwrap.dedent("""
1822
1819
  ewogICJhcmNoaXRlY3R1cmVzIjogWwogICAgIk1hc2tGb3JtZXJGb3JJbnN0YW5jZVNlZ21lbnRhdGlvb
1823
1820
  iIKICBdLAogICJiYWNrYm9uZSI6IG51bGwsCiAgImJhY2tib25lX2NvbmZpZyI6IHsKICAgICJhdHRlbn
1824
1821
  Rpb25fcHJvYnNfZHJvcG91dF9wcm9iIjogMC4wLAogICAgImRlcHRocyI6IFsKICAgICAgMSwKICAgICA
@@ -1866,8 +1863,7 @@ def _ccached_hf_internal_testing_tiny_random_maskformerforinstancesegmentation()
1866
1863
  b2F0MzIiLAogICJ0cmFuc2Zvcm1lcnNfdmVyc2lvbiI6ICI0LjUxLjAuZGV2MCIsCiAgInVzZV9hdXhpb
1867
1864
  GlhcnlfbG9zcyI6IGZhbHNlLAogICJ1c2VfcHJldHJhaW5lZF9iYWNrYm9uZSI6IGZhbHNlLAogICJ1c2
1868
1865
  VfdGltbV9iYWNrYm9uZSI6IGZhbHNlCn0K
1869
- """.strip()
1870
- )
1866
+ """.strip())
1871
1867
  js = base64.b64decode(t64.encode("utf-8"))
1872
1868
  kwargs = json.loads(js)
1873
1869
  return transformers.MaskFormerConfig(**kwargs)
@@ -1910,8 +1906,7 @@ def _ccached_echarlaix_tiny_random_mistral():
1910
1906
 
1911
1907
  def _ccached_hf_internal_testing_tiny_random_mobilevit():
1912
1908
  "hf-internal-testing/tiny-random-mobilevit"
1913
- t64 = textwrap.dedent(
1914
- """
1909
+ t64 = textwrap.dedent("""
1915
1910
  ewogICJhcmNoaXRlY3R1cmVzIjogWwogICAgIk1vYmlsZVZpVEZvckltYWdlQ2xhc3NpZmljYXRpb24iC
1916
1911
  iAgXSwKICAiYXNwcF9kcm9wb3V0X3Byb2IiOiAwLjEsCiAgImFzcHBfb3V0X2NoYW5uZWxzIjogMjU2LA
1917
1912
  ogICJhdHJvdXNfcmF0ZXMiOiBbCiAgICA2LAogICAgMTIsCiAgICAxOAogIF0sCiAgImF0dGVudGlvbl9
@@ -3064,8 +3059,7 @@ def _ccached_hf_internal_testing_tiny_random_mobilevit():
3064
3059
  iAgIm91dHB1dF9zdHJpZGUiOiAzMiwKICAicGF0Y2hfc2l6ZSI6IDIsCiAgInFrdl9iaWFzIjogdHJ1ZS
3065
3060
  wKICAic2VtYW50aWNfbG9zc19pZ25vcmVfaW5kZXgiOiAyNTUsCiAgInRvcmNoX2R0eXBlIjogImZsb2F
3066
3061
  0MzIiLAogICJ0cmFuc2Zvcm1lcnNfdmVyc2lvbiI6ICI0LjUxLjAuZGV2MCIKfQo=
3067
- """.strip()
3068
- )
3062
+ """.strip())
3069
3063
  js = base64.b64decode(t64.encode("utf-8"))
3070
3064
  kwargs = json.loads(js)
3071
3065
  return transformers.MobileViTConfig(**kwargs)
@@ -871,7 +871,7 @@ def validate_model(
871
871
  this is not always possible
872
872
  :param use_pretrained: use the trained model, not the untrained one
873
873
  :param optimization: optimization to apply to the exported model,
874
- depend on the the exporter
874
+ depend on the exporter
875
875
  :param quiet: if quiet, catches exception if any issue
876
876
  :param patch: applies patches (``patch_transformers=True, path_diffusers=True``)
877
877
  if True before exporting
@@ -5,7 +5,6 @@ import numpy as np
5
5
  import onnx
6
6
  from ..helpers.onnx_helper import onnx_dtype_name
7
7
 
8
-
9
8
  _NOT_SO_FAR_OPS = [
10
9
  {"MatMul", "Gemm", "FusedMatMul"},
11
10
  {"Conv", "FusedConv"},
@@ -2,7 +2,7 @@ import enum
2
2
  from typing import Any, Dict, List, Optional, Set, Tuple, Union
3
3
  import onnx
4
4
  import torch
5
- from ..api import TensorLike
5
+ from ..typing import TensorLike
6
6
  from ..helpers import string_type
7
7
  from ..helpers.onnx_helper import get_hidden_inputs
8
8
 
@@ -374,7 +374,7 @@ def _preparation_with_fx_graph(
374
374
  positions[n] = dict(fx=i)
375
375
  if node.op == "placeholder":
376
376
  if node.name in placeholders_to_state_dict:
377
- # This a weight.
377
+ # This is a weight.
378
378
  placeholders[node.name] = ep_state_dict[placeholders_to_state_dict[node.name]]
379
379
  torch_results[node.name] = placeholders[node.name]
380
380
  assert isinstance(torch_results[node.name], torch.Tensor), (
@@ -120,8 +120,7 @@ class ReplayConfiguration:
120
120
  rc = ReplayConfiguration(dump_folder="unused")
121
121
  print(rc.get_replay_code())
122
122
  """
123
- return textwrap.dedent(
124
- """
123
+ return textwrap.dedent("""
125
124
  import onnx
126
125
  import torch
127
126
  from onnx_diagnostic.helpers import max_diff, string_diff, string_type
@@ -225,8 +224,7 @@ class ReplayConfiguration:
225
224
  sess.run(None, ep_feeds)
226
225
  obj = prof.key_averages()
227
226
  print(obj.table())
228
- """
229
- )
227
+ """)
230
228
 
231
229
  def dump(
232
230
  self,
@@ -0,0 +1,15 @@
1
+ from typing import Any, Dict, List, Protocol, Tuple, runtime_checkable
2
+
3
+
4
+ @runtime_checkable
5
+ class TensorLike(Protocol):
6
+ @property
7
+ def shape(self) -> Tuple[int, ...]: ...
8
+ @property
9
+ def dtype(self) -> object: ...
10
+
11
+
12
+ @runtime_checkable
13
+ class InferenceSessionLike(Protocol):
14
+ def __init__(self, model: Any, **kwargs): ...
15
+ def run(self, feeds: Dict[str, TensorLike]) -> List[TensorLike]: ...
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: onnx-diagnostic
3
- Version: 0.8.10
3
+ Version: 0.9.0
4
4
  Summary: Tools to help converting pytorch models into ONNX.
5
5
  Home-page: https://github.com/sdpython/onnx-diagnostic
6
6
  Author: Xavier Dupré
@@ -91,7 +91,7 @@ Enlightening Examples
91
91
  * `Export microsoft/phi-2
92
92
  <https://sdpython.github.io/doc/onnx-diagnostic/dev/auto_examples/plot_export_tiny_phi2.html>`_
93
93
  * `Export a LLM through method generate (with Tiny-LLM)
94
- <https://sdpython.github.io/doc/onnx-diagnostic/dev/auto_examples/plot_export_tiny_llm_method_generate.html>`_
94
+ <https://sdpython.github.io/doc/onnx-diagnostic/dev/auto_final/plot_export_tiny_llm_method_generate.html>`_
95
95
 
96
96
  **Torch Export**
97
97
 
@@ -1,48 +1,53 @@
1
- onnx_diagnostic/__init__.py,sha256=hheb1Xv21S-ukwOrWVc48HZ9f_jgwqg27V4HdlvfuZQ,174
1
+ onnx_diagnostic/__init__.py,sha256=hp8Jeb4rpAUldATxz_DyWOTlzHxT2YqTum8AVG-NRGk,173
2
2
  onnx_diagnostic/__main__.py,sha256=YmyV_Aq_ianDlHyKLHMa6h8YK3ZmFPpLVHLKjM91aCk,79
3
- onnx_diagnostic/_command_lines_parser.py,sha256=g_udwHBHmY6X_d41Qby_DqMpEHL1p9GfUhJGBCihl8c,57784
4
- onnx_diagnostic/api.py,sha256=BhCl_yCd78N7TlVtPOHjeYv1QBEy39TjZ647rcHqLh0,345
3
+ onnx_diagnostic/_command_lines_parser.py,sha256=nR-WI-15da9e0o-z5mIKezCH4dGFU66gCbyuAFu2FzY,59315
5
4
  onnx_diagnostic/doc.py,sha256=-w2qaes0G0TM0PQFTzBVcJPh0r_IR6Vd2j2fj9iV65Y,10478
6
- onnx_diagnostic/ext_test_case.py,sha256=A6BkrRm-QbvM8A-qRRMLt9o9ZO6wMXE9jrotggjpGfE,50460
5
+ onnx_diagnostic/ext_test_case.py,sha256=5WQrMdILgr-j8hrqBs7Vi6IFMD3TXNHD7Dlr9K5y1es,51495
6
+ onnx_diagnostic/typing.py,sha256=okLjQGA_ikThoMQ1ikjeu-pCi9FiaO8uhSoKz1ufCQ8,409
7
7
  onnx_diagnostic/ci_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  onnx_diagnostic/ci_models/ci_helpers.py,sha256=lblOF7z2kLcCRAwMOdqp-Tz1EL1oBywHfVokhqiTQRg,15592
9
- onnx_diagnostic/ci_models/export_phi4_mm.py,sha256=DH225jXhOG_S8KZE9Kn7FGNE4VqFyc9ZDnG-qxZn-hk,41668
9
+ onnx_diagnostic/ci_models/export_phi4_mm.py,sha256=anCnx5lt7aGZVrzd4XCJv28-isoCX7feEHHEZDtrW-Y,41735
10
10
  onnx_diagnostic/ci_models/export_qwen25_vl.py,sha256=_rYPr8PPraWizr2MPcGuYjrJ55ilJOyKl8kg0wq4L90,20405
11
+ onnx_diagnostic/ci_models/data/Blanca_Lake_Hudak.jpg,sha256=O_mpR1XvIxBpQix0Tgit39Vd1PvAefbPquTJ6ChEwcA,690409
12
+ onnx_diagnostic/ci_models/data/Ice_worm_glacier.jpg,sha256=GkteS7CrGfMQ8Hdyk-ShGtXr5HomFy1mKivJEHXdM2Q,610733
13
+ onnx_diagnostic/ci_models/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
14
  onnx_diagnostic/export/__init__.py,sha256=yEIoWiOeTwBsDhyYt2fTKuhtA0Ya1J9u9ZzMTOTWaWs,101
12
- onnx_diagnostic/export/api.py,sha256=7CL_IfVERPKTvKSkFfxlfXfVqUDuYAmDykCEW5CktMo,43202
15
+ onnx_diagnostic/export/api.py,sha256=3O21VcaJ0CyZ0X8FwXjPXTCoNfWu1q6iBHeoeDvtOmc,43583
13
16
  onnx_diagnostic/export/cf_simple_loop_for.py,sha256=OHPGQc9AC-0TBtCYpP6cm-iHP9gmNt8WYRrPlO9ewlc,21158
14
17
  onnx_diagnostic/export/control_flow_onnx.py,sha256=izGlctqQANrHzSxPMbT7hoauNbnIBdx6hb8ry7HtVmM,18263
15
- onnx_diagnostic/export/dynamic_shapes.py,sha256=_3xnWXa4n7fTkAT0NSLyLkcEJqm896wHKA8ilEyxvm0,44746
18
+ onnx_diagnostic/export/dynamic_shapes.py,sha256=AOfKmGYIs_5hZPy7vi9pZDbpvu-wIlD2cD15lV8rl9E,44763
16
19
  onnx_diagnostic/export/onnx_plug.py,sha256=U13fL0BjnhMzcDGxaAOqM4TQte5Z4zKDg4ESS0iktjM,22704
17
20
  onnx_diagnostic/export/shape_helper.py,sha256=K3y8-vFXYGg5R1tgeVOm_RjCZ8-yyrvYkQ4b3ILM5H4,10990
18
- onnx_diagnostic/export/validate.py,sha256=_PGUql2DJhIgGKo0WjTGUc5AgsZUx8fEs00MePy-w98,6043
21
+ onnx_diagnostic/export/validate.py,sha256=t8NZjgLqLjabKpUDjO5A5nBk_-BAsN1cdq-6UJ0Jm88,6127
19
22
  onnx_diagnostic/helpers/__init__.py,sha256=GJ2GT7cgnlIveVUwMZhuvUwidbTJaKv8CsSIOpZDsJg,83
20
23
  onnx_diagnostic/helpers/_log_helper.py,sha256=OTwQH0OIxs9B6nrSvR7MoxMimSw_8mU0mj133NvLk5o,16832
21
- onnx_diagnostic/helpers/args_helper.py,sha256=SRWnqC7EENg09RZlA50B_PcdiIhdbgA4C3ACfzl5nMs,4419
22
- onnx_diagnostic/helpers/bench_run.py,sha256=Vvzb7Wy0baIT5O0dx4RKQTx-5V08PiHxPJh6XPkY-lU,16544
23
- onnx_diagnostic/helpers/cache_helper.py,sha256=aKy566IGuNTZI14Fk3BlByxPYzuU-401eiXY8GN_UWE,31895
24
+ onnx_diagnostic/helpers/args_helper.py,sha256=qHxXJAM4ovBSYeufVVGMRQwrOW2AuP_HFQgqgU-QBQM,4463
25
+ onnx_diagnostic/helpers/bench_run.py,sha256=9T26icFQOSo3HB1gEw31bf-mD5BrVATrRDhuyWESxz8,16543
26
+ onnx_diagnostic/helpers/cache_helper.py,sha256=INfp9dkGTl3HDEQYbK_fC0T9dMgTuk0pNCNXjwB3Z9w,35033
24
27
  onnx_diagnostic/helpers/config_helper.py,sha256=cWRETgFhZ7tayIZPnMqF8BF5AvTU64G2BMqyzgO7lzs,5670
25
- onnx_diagnostic/helpers/doc_helper.py,sha256=pl5MZd3_FaE8BqQnqoBuSBxoNCFcd2OJd3eITUSku5c,5897
28
+ onnx_diagnostic/helpers/doc_helper.py,sha256=9rigmq36D20yCKG5VkQnODiWMG2eJ0p22UdHew66UrQ,5983
26
29
  onnx_diagnostic/helpers/dot_helper.py,sha256=hwgTJsbsUv0qq7euyPDnc1NsBZDGOwv32JXSZxIHJkE,8118
27
30
  onnx_diagnostic/helpers/fake_tensor_helper.py,sha256=59046wDIw84or6PJxLaa2CFqaWT7Y3mpYr-BB2shcBE,12027
28
- onnx_diagnostic/helpers/graph_helper.py,sha256=hevQT5a7_QuriVPQcbT5qe18n99Doyl5h3-qshx1-uk,14093
29
- onnx_diagnostic/helpers/helper.py,sha256=7rBu2mQVxQxXrW1YuK433Lp68lvgNOhEqUNkuv9GxJw,66454
30
- onnx_diagnostic/helpers/log_helper.py,sha256=3mWQd-nLKCctKZt9N8SpoWgLC8O7YdNQ2pfW5QXYWDQ,93232
31
- onnx_diagnostic/helpers/memory_peak.py,sha256=M3m4_thWFIwP5HytbJYEqaijXIv5v5BW_vlcJowIYI4,6434
32
- onnx_diagnostic/helpers/mini_onnx_builder.py,sha256=jR2lkRZEQ0N30H0FqeBwaxJd_w_6kyxFagrnulqFjhE,23883
33
- onnx_diagnostic/helpers/model_builder_helper.py,sha256=qKIq4Naqq03gk6NfqXLQjSDiKL5FFNc1AEyVX0R8GmA,18540
34
- onnx_diagnostic/helpers/onnx_helper.py,sha256=f5iyzNIXWS90COkERnEb8txafH19CRYWKdKVY_lF05Q,57801
31
+ onnx_diagnostic/helpers/graph_helper.py,sha256=ailTFdJu1Kir1VQ4GDsm9bUDIevZmgsJVJBGu7CFbCM,14100
32
+ onnx_diagnostic/helpers/helper.py,sha256=hqWZ-VDrnNDehdM8nJN6mblUxZeH-He4dvy378a5LMM,67773
33
+ onnx_diagnostic/helpers/log_helper.py,sha256=njGse2PeD1muXVYvEMl6dsWTDja76wCWipxrEMAkLiw,94504
34
+ onnx_diagnostic/helpers/memory_peak.py,sha256=kigKbD3cq6ZCkE_nhOgNIkr9zHP9zp7ezZhut8GTrcI,6596
35
+ onnx_diagnostic/helpers/mini_onnx_builder.py,sha256=3IAJRf7bphKN0sY714me7H1UzEA1ejJQNYY7cMbGkCo,23878
36
+ onnx_diagnostic/helpers/model_builder_helper.py,sha256=r8LG3xh_-gwp4RODVM9jhB9HNWvccuNypwygWHoU2jA,18548
37
+ onnx_diagnostic/helpers/onnx_helper.py,sha256=DosgZN1ZU47xA2FN49JCfcmKF9rC8jeO9Vu5icstdOY,64437
35
38
  onnx_diagnostic/helpers/optim_helper.py,sha256=0NiYRwV9GLTub4SEny0dqEhLcajRjEhcgkeBDVr9bGQ,4424
36
- onnx_diagnostic/helpers/ort_session.py,sha256=Y6iJojJcQtPesy9dRaaxRSeRTLXk0Pdh6-_fzdiPDm0,30779
37
- onnx_diagnostic/helpers/rt_helper.py,sha256=YhVB7v5iR_UT9IqCeqyg58IEIx18f_TnCO6u6GhUciQ,38711
39
+ onnx_diagnostic/helpers/ort_session.py,sha256=gYSUTuUFd8vf7Hk48HZ7B73f83ZUeCcTa6BE6ylk8as,30975
40
+ onnx_diagnostic/helpers/rt_helper.py,sha256=ZuWYTI4Nc_z556PXnS5qtpT__YlyTOwn9ocQ1vw-hfY,40352
38
41
  onnx_diagnostic/helpers/torch_fx_graph_helper.py,sha256=7xFe4svdbr4gV3OTNcx8eJejjDyHAv4hD_RNNKSxL0c,6571
39
- onnx_diagnostic/helpers/torch_helper.py,sha256=H_rNXq4G78-45pJ2vsO0b_VxYVpSp6DVrOKaal6-VXo,39346
42
+ onnx_diagnostic/helpers/torch_helper.py,sha256=WrC6pr7oT7d8P-34FVDrM7ZYtVEx62OaSGlwK2N_7sc,39782
43
+ onnx_diagnostic/investigate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
+ onnx_diagnostic/investigate/input_observer.py,sha256=vA3I_fDizIIL4m3ETl6qb5qPmmf6QcSYox06FJXOqh0,40576
40
45
  onnx_diagnostic/reference/__init__.py,sha256=rLZsxOlnb7-81F2CzepGnZLejaROg4JvgFaGR9FwVQA,208
41
- onnx_diagnostic/reference/evaluator.py,sha256=RzNzjFDeMe-4X51Tb22N6aagazY5ktNq-mRmPcfY5EU,8848
42
- onnx_diagnostic/reference/ort_evaluator.py,sha256=q7Dn0yC3LPadlfRnhiRzVn32k9ma_IivdYyhyecgNgc,33930
46
+ onnx_diagnostic/reference/evaluator.py,sha256=5PcPL_5xuEmm4j16KK0o2N5UkdUpuTSxQYc48MPWLpw,8847
47
+ onnx_diagnostic/reference/ort_evaluator.py,sha256=J3keuxFGnQIKP9V80U61y9rpU3zE26RR7HPozeaeiYo,33929
43
48
  onnx_diagnostic/reference/quantized_tensor.py,sha256=5u67uS2uGacdMD5VYCbpojNjiesDlV_kO0fAJ0vUWGE,1098
44
- onnx_diagnostic/reference/report_results_comparison.py,sha256=OsyQN8EHZZoj97u74RQP-7WFpebPOso5GEDpdkLWu6M,3645
45
- onnx_diagnostic/reference/torch_evaluator.py,sha256=Tx1teWvfGEX5RmkDnI83UiOlo5eBOC72vPhgTWdFUF0,27689
49
+ onnx_diagnostic/reference/report_results_comparison.py,sha256=aldQTYnjfHRdRVOUNldQpCS8U76_KDxwv77-CbNDcNc,3914
50
+ onnx_diagnostic/reference/torch_evaluator.py,sha256=n8BCLcmpi6-ur8JWTHbzuk-dRpJQj42_AwBF94Pdu7U,27921
46
51
  onnx_diagnostic/reference/ops/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
47
52
  onnx_diagnostic/reference/ops/op_add_add_mul_mul.py,sha256=CXQVtgVrT066gDJFwxL4nDSY4G8r08XNu3EwhWqMapU,1521
48
53
  onnx_diagnostic/reference/ops/op_attention.py,sha256=ThALMDF53v3QeG1bohi0bvX2o90HZhGJbbAFOtwEHPE,2027
@@ -73,7 +78,7 @@ onnx_diagnostic/reference/ops/op_slice.py,sha256=yRxfYBs8b7QezyyG9JHCD8MIJHij2qR
73
78
  onnx_diagnostic/reference/ops/op_transpose_cast.py,sha256=ifef74rvh0Yvq1Zx51B4mfnISbxV9uRg9DFjkdL1_68,361
74
79
  onnx_diagnostic/reference/ops/op_tri_matrix.py,sha256=Yn2gxAyygcwtF5Hjau9ihXDAzul0BAkdqVimVahtFBU,519
75
80
  onnx_diagnostic/reference/torch_ops/__init__.py,sha256=fIDMG0KhNYuB4q_57Z5zz0ME6_w8Q0tnqUCooijoOW4,1163
76
- onnx_diagnostic/reference/torch_ops/_op_run.py,sha256=EEUIwfbRldEFDhULquYhk9x5ZDa9t6f2mKJ1sM__D6A,10517
81
+ onnx_diagnostic/reference/torch_ops/_op_run.py,sha256=qBGaLUWg0wWaTCUlbJq9OpmbHQRiQjtiP7Pbf7LgBXY,10536
77
82
  onnx_diagnostic/reference/torch_ops/access_ops.py,sha256=Zfs5OF03PV1CqlCqKI5VV-c4MY3KyQxmO7QZksxQjX8,3274
78
83
  onnx_diagnostic/reference/torch_ops/binary_ops.py,sha256=-KxMcCYGDTcZyOss9qU1nU0rmdyg9SdVHJQohseSTcQ,2653
79
84
  onnx_diagnostic/reference/torch_ops/controlflow_ops.py,sha256=uOEmzbM4nR2FwZQ8UikwEaHih3yw6T24D_VLYkr5RSU,4518
@@ -81,12 +86,12 @@ onnx_diagnostic/reference/torch_ops/generator_ops.py,sha256=dqqFvhkazVxRUDYhO2t-
81
86
  onnx_diagnostic/reference/torch_ops/nn_ops.py,sha256=TeFxQEiTezx9UUzu82ToCLUnUOU56kKv6X81RdZ8UC8,7238
82
87
  onnx_diagnostic/reference/torch_ops/other_ops.py,sha256=FnCY60mhdrzrsiHgvN-XpFRHYUpI0gIRqxgVK5J_na0,3995
83
88
  onnx_diagnostic/reference/torch_ops/reduce_ops.py,sha256=9gFfraPTQbe_ZEUNCUis1JSmA5dj4tSzjAOpZPJKG4Y,5102
84
- onnx_diagnostic/reference/torch_ops/sequence_ops.py,sha256=3EiVKpGfN4d1Iry4hgnr3MIJyEEKUrAIDgmRGsUXXa0,2297
89
+ onnx_diagnostic/reference/torch_ops/sequence_ops.py,sha256=POEYPF2sCDM5Ev5w_awpgtcr1XrVhLNva5vgXMUh_UU,2323
85
90
  onnx_diagnostic/reference/torch_ops/shape_ops.py,sha256=pJrNR2UB4PlWl6cv4EDl1uGl8YTBUUMQkhJcsh5K4sA,4291
86
91
  onnx_diagnostic/reference/torch_ops/unary_ops.py,sha256=dwu6HPr4V_roxu85U3VLTtDLx5bfxKalT_-zlQxZ5wc,1850
87
92
  onnx_diagnostic/tasks/__init__.py,sha256=kk-I2tgtb32A_ANh6Ux_u982mA2SrQKO_MDp0KsRi28,2774
88
93
  onnx_diagnostic/tasks/automatic_speech_recognition.py,sha256=aMufLDGW005f7aLMZ9alIQtg2s_WIUk5Rd9udS_BZ38,6964
89
- onnx_diagnostic/tasks/feature_extraction.py,sha256=IS9z9fPNE0hhGUebBfmNZl0twdXobMc7MFKpQB9qZI0,5388
94
+ onnx_diagnostic/tasks/feature_extraction.py,sha256=qfYjK_Pl555eoQjPuk_XnycTKAkr84FtvwrivyRPEc0,5387
90
95
  onnx_diagnostic/tasks/fill_mask.py,sha256=5Gt6zlj0p6vuifox7Wmj-TpHXJvPS0CEH8evgdBHDNA,2640
91
96
  onnx_diagnostic/tasks/image_classification.py,sha256=nLpBBB1Gkog3Fk6pu2waiHcuQr4ILPptc9FhQ-pn460,4682
92
97
  onnx_diagnostic/tasks/image_text_to_text.py,sha256=LFHngpedt4Ws2lj1v0QIqmbTvpV_IbOE05M3o2GRPfs,22289
@@ -103,13 +108,13 @@ onnx_diagnostic/tasks/text_to_image.py,sha256=mOS3Ruosi3hzRMxXLDN7ZkAbi7NnQb7MWw
103
108
  onnx_diagnostic/tasks/zero_shot_image_classification.py,sha256=jJCMWuOqGv5ahCfjrcqxuYCJFhTgHV5KUf2yyv2yxYA,4624
104
109
  onnx_diagnostic/tasks/data/__init__.py,sha256=uJoemrWgEjI6oA-tMX7r3__x-b3siPmkgqaY7bgIles,401
105
110
  onnx_diagnostic/tasks/data/dummies_imagetext2text_generation_gemma3.onnx,sha256=UbtvmWMqcZOKJ-I-HXWI1A6YR6QDaFS5u_yXm5C3ZBw,10299
106
- onnx_diagnostic/torch_export_patches/__init__.py,sha256=0SaZedwznm1hQUCvXZsGZORV5vby954wEExr5faepGg,720
107
- onnx_diagnostic/torch_export_patches/onnx_export_errors.py,sha256=XHYtU7w3vsaTMCuF5X1YtOKxgwL8eEuktXzVZpRz55o,43431
111
+ onnx_diagnostic/torch_export_patches/__init__.py,sha256=KcBsUXOzw0n-Eo6uFQUUCnJjDsHLnR_J7u-SJu0d6bo,719
112
+ onnx_diagnostic/torch_export_patches/onnx_export_errors.py,sha256=1q615Li3qQskArEjDT31uB9emeY6ByfHtOO7XIkDWhI,44023
108
113
  onnx_diagnostic/torch_export_patches/onnx_export_serialization.py,sha256=KZgr8WbLvmZte1G1hKA0zIlio5ZHz9MKIwGPqNamB6E,12690
109
114
  onnx_diagnostic/torch_export_patches/patch_details.py,sha256=UHBo4QTLF3ZgQ4951yYHIQqxOeRYNaG7x56XFcRTtg4,11794
110
115
  onnx_diagnostic/torch_export_patches/patch_expressions.py,sha256=VOsv71FsR_UZtxz4-5_VKL2sHQhOkHy9RkPJME2h7UU,3271
111
116
  onnx_diagnostic/torch_export_patches/patch_inputs.py,sha256=-TgcyjVzxTb5Y-_ibssTeaA5PFz6FJrV6q84HMUAsJw,8075
112
- onnx_diagnostic/torch_export_patches/patch_module.py,sha256=1Mn3xdpK1jSdRs6z1C-mJGkfGmD2TNRwLNoPaOW_EFI,40061
117
+ onnx_diagnostic/torch_export_patches/patch_module.py,sha256=Tcgi3osMcTGUsKg03GnbFL7HfZRVncVsJQ50KRHM4Z8,40064
113
118
  onnx_diagnostic/torch_export_patches/patch_module_helper.py,sha256=2U0AdyZuU0W54QTdE7tY7imVzMnpQ5091ADNtTCkT8Y,6967
114
119
  onnx_diagnostic/torch_export_patches/eval/__init__.py,sha256=15FNHm0Ztz9kuHeXiL0dIT_ABaNtKh_jMRbM8Kt0h7Y,25057
115
120
  onnx_diagnostic/torch_export_patches/eval/model_cases.py,sha256=9h4yo9vKiK-E6zaXyAsxXGM-lCjd88ONybA1F3YcTI4,27988
@@ -122,38 +127,38 @@ onnx_diagnostic/torch_export_patches/patches/_patch_transformers_funnel.py,sha25
122
127
  onnx_diagnostic/torch_export_patches/patches/_patch_transformers_gemma3.py,sha256=nVgYQk0xXpHiictN1wOHVMN2lTH9b0vfIJ4ie-uKopg,1999
123
128
  onnx_diagnostic/torch_export_patches/patches/_patch_transformers_generation_mixin.py,sha256=VIZsVHgR8NmAcBQalPl5I6ZzNgcBxjGb6ars31m9gRg,21936
124
129
  onnx_diagnostic/torch_export_patches/patches/_patch_transformers_idefics.py,sha256=kTjuTRsfkGGGhspJnMxAMQSchZgGC_IruJzpHh_FmI8,6348
125
- onnx_diagnostic/torch_export_patches/patches/_patch_transformers_masking_utils.py,sha256=HE3fovyvMiYe9EPz1UjdD9AWopX3H188SMwPb8w5mzM,7111
130
+ onnx_diagnostic/torch_export_patches/patches/_patch_transformers_masking_utils.py,sha256=WD7424vssc_uEpcoG_E5V7edxugVratMQJSng5s3zW8,11808
126
131
  onnx_diagnostic/torch_export_patches/patches/_patch_transformers_qwen2.py,sha256=OxYdlLrwtd_KGHt3E17poduxvWFg-CfGS57-yN1i6gI,3827
127
132
  onnx_diagnostic/torch_export_patches/patches/_patch_transformers_qwen2_5.py,sha256=oYz0tr-6KH0DabpgaISytnXAGxQosoA8gV5LpksO4yI,34834
128
133
  onnx_diagnostic/torch_export_patches/patches/_patch_transformers_qwen3.py,sha256=cND9Iqo1aKdlX-BXGr9Qlq_Y4EW1L5VWSwZfqYTVazU,4888
129
- onnx_diagnostic/torch_export_patches/patches/_patch_transformers_rotary_embedding.py,sha256=LAqoL5SWISekZO15G1HIcCkN1JlBxGqb9XbK_eLzalA,16949
134
+ onnx_diagnostic/torch_export_patches/patches/_patch_transformers_rotary_embedding.py,sha256=AQTAAGhpg_Jlzc_26c9rmoZRuhmJcrFX488_W_Z0QD8,16945
130
135
  onnx_diagnostic/torch_export_patches/patches/_patch_transformers_sam_mask_decoder.py,sha256=-6TuBm3sLAFEGuW3vRfOTtE5uP6aINFfu7xMnl27Dws,5703
131
136
  onnx_diagnostic/torch_export_patches/patches/patch_helper.py,sha256=kK_CGW643iVXxa-m6pttDBS7HTyMQaPypza7iqIInn4,721
132
- onnx_diagnostic/torch_export_patches/patches/patch_torch.py,sha256=IpvyM5yhA3tioyDAwAEe3gZDvbRUwCI_CzKmm76zwyU,45297
133
- onnx_diagnostic/torch_export_patches/patches/patch_transformers.py,sha256=1W3iKVYx2QT2xJTKlz1UmtjySuwv-rfT5yVL9DjOfzI,3376
137
+ onnx_diagnostic/torch_export_patches/patches/patch_torch.py,sha256=xoWyNn-hj9d6TW-DVYSUJfhYzJJgpLiG3HZzcQA3k7s,45743
138
+ onnx_diagnostic/torch_export_patches/patches/patch_transformers.py,sha256=UXfHCu-v1uw0CY7XSjPz35GOQKjtdwxKZUOm_ACelNw,3403
134
139
  onnx_diagnostic/torch_export_patches/serialization/__init__.py,sha256=BHLdRPtNAtNPAS-bPKEj3-foGSPvwAbZXrHzGGPDLEw,1876
135
140
  onnx_diagnostic/torch_export_patches/serialization/diffusers_impl.py,sha256=drq3EH_yjcSuIWYsVeUWm8Cx6YCZFU6bP_1PLtPfY5I,945
136
- onnx_diagnostic/torch_export_patches/serialization/transformers_impl.py,sha256=kcjMbGfNqftt5X1cP-d153qvK_d5FRRuDyCuieHGieU,10941
141
+ onnx_diagnostic/torch_export_patches/serialization/transformers_impl.py,sha256=mBJ8iMngSqI9JJPceq2At9rDWAlRmmRRYFudSl7wgok,12421
137
142
  onnx_diagnostic/torch_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
138
- onnx_diagnostic/torch_models/code_sample.py,sha256=rCDZY64pkn6uIbJJSBuC5TlU_-uleI73I9GlbXtJd54,12923
143
+ onnx_diagnostic/torch_models/code_sample.py,sha256=D0Hv5PJQj2J8Nivoha-RzCdvVhsWYFVFEoG2D2yKm5k,12882
139
144
  onnx_diagnostic/torch_models/llms.py,sha256=soyg4yC87ptGoeulJhKqw5opGmuLvH1pn_ZDXZ4Jr8E,90
140
- onnx_diagnostic/torch_models/validate.py,sha256=JsEMv7aeg9tGGriKZ_CJeqGDfNUmZNdGtPu5jQN9TWY,96739
145
+ onnx_diagnostic/torch_models/validate.py,sha256=THCsMInLdWQ5a5LJbBtziDWHhKMlBXiHORoUr1NVflw,96735
141
146
  onnx_diagnostic/torch_models/hghub/__init__.py,sha256=vi1Q7YHdddj1soiBN42MSvJdFqe2_KUoWafHISjwOu8,58
142
147
  onnx_diagnostic/torch_models/hghub/hub_api.py,sha256=V3azxUqb7mkmHQ8m5DCgg1WUU2NYBK12USEUy_sfYIA,14709
143
- onnx_diagnostic/torch_models/hghub/hub_data.py,sha256=6jR8A83cGP4Xw1Wg-q1zzKFpqzoVrybqm0Fm3yurkrE,9030
144
- onnx_diagnostic/torch_models/hghub/hub_data_cached_configs.py,sha256=Q4rZz81erNAXzSoezR5kR1Qe_l_Rtn7k4egOx_L8LQU,292725
148
+ onnx_diagnostic/torch_models/hghub/hub_data.py,sha256=Xr7bRZk_zCa7sylgZKSRpMcbdFxS4hWxNalM7YKcoDU,9024
149
+ onnx_diagnostic/torch_models/hghub/hub_data_cached_configs.py,sha256=M5B-wa0qi01iivDSgk74QCGE7iy7PvTpgJz7qugj3NM,292683
145
150
  onnx_diagnostic/torch_models/hghub/model_inputs.py,sha256=XahJ-m6ajdXg6vFGUOfV5IvFwn-yjAsIOU37nISbBoo,17646
146
151
  onnx_diagnostic/torch_models/hghub/model_specific.py,sha256=j50Nu7wddJMoqmD4QzMbNdFDUUgUmSBKRzPDH55TlUQ,2498
147
152
  onnx_diagnostic/torch_models/untrained/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
148
153
  onnx_diagnostic/torch_models/untrained/llm_phi2.py,sha256=HKj0krVNDI--mWHaTzagZ2RWAwe68P2n4JHKuW2ybFI,3975
149
154
  onnx_diagnostic/torch_models/untrained/llm_tiny_llm.py,sha256=QXw_Bs2SzfeiQMf-tmtVl83SmVOL4-Um7Qy-f0E48QI,2507
150
155
  onnx_diagnostic/torch_onnx/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
151
- onnx_diagnostic/torch_onnx/compare.py,sha256=O0lws4kzn8WAXr8-x-YMPr7oyBC9DtSIs4OfOr4S5-E,12305
152
- onnx_diagnostic/torch_onnx/runtime_info.py,sha256=u1bD6VXqzBCRmqmbzQtDswaPs1PH_ygr1r-CrcfXpNU,8562
153
- onnx_diagnostic/torch_onnx/sbs.py,sha256=8okBEIupMgw7TtKc80YFimMtwnY3GchdY05FsA9ooa0,40749
154
- onnx_diagnostic/torch_onnx/sbs_dataclasses.py,sha256=UctdBjzoPTQG1LS0tZ8A6E9hpoq5HWUYaJLPOPJc9FI,20299
155
- onnx_diagnostic-0.8.10.dist-info/licenses/LICENSE.txt,sha256=Vv6TXglX6Rc0d-f8aREhayhT-6PMQXEyOmI2NKlUCMc,1045
156
- onnx_diagnostic-0.8.10.dist-info/METADATA,sha256=dvG6WDkXq8Y56whBI15kB40qx1XhXSQyyUvN7Q6JOYo,6904
157
- onnx_diagnostic-0.8.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
158
- onnx_diagnostic-0.8.10.dist-info/top_level.txt,sha256=KwNkXewmcobM3ZT1DJLVWH6ebJzA5qKg7cWqKfpGNT4,16
159
- onnx_diagnostic-0.8.10.dist-info/RECORD,,
156
+ onnx_diagnostic/torch_onnx/compare.py,sha256=pXPZ168pT7J_-UOOvsbmS_dCJcwaPjA7GxiLR7Ug8GQ,12304
157
+ onnx_diagnostic/torch_onnx/runtime_info.py,sha256=Mv6WQXNtfNF31zgLm5Hk3x2fTDS6p8UjPh51_Jn4tl0,8565
158
+ onnx_diagnostic/torch_onnx/sbs.py,sha256=xeq4jrMnTeLvZ3UjFlMNpm-VBbP_16fPwTi1_Ujvilo,40752
159
+ onnx_diagnostic/torch_onnx/sbs_dataclasses.py,sha256=WPu9hdz8dIXqvFYy-xtPX9liD_DUVkXOWO_vElOGksY,20277
160
+ onnx_diagnostic-0.9.0.dist-info/licenses/LICENSE.txt,sha256=Vv6TXglX6Rc0d-f8aREhayhT-6PMQXEyOmI2NKlUCMc,1045
161
+ onnx_diagnostic-0.9.0.dist-info/METADATA,sha256=-gBCPiRO-6gtbL_khtaTN8GC_UyZNzlY2PmYUo3lCW4,6900
162
+ onnx_diagnostic-0.9.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
163
+ onnx_diagnostic-0.9.0.dist-info/top_level.txt,sha256=KwNkXewmcobM3ZT1DJLVWH6ebJzA5qKg7cWqKfpGNT4,16
164
+ onnx_diagnostic-0.9.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
onnx_diagnostic/api.py DELETED
@@ -1,15 +0,0 @@
1
- from typing import Any
2
-
3
-
4
- class TensorLike:
5
- """Mocks a tensor."""
6
-
7
- @property
8
- def dtype(self) -> Any:
9
- "Must be overwritten."
10
- raise NotImplementedError("dtype must be overwritten.")
11
-
12
- @property
13
- def shape(self) -> Any:
14
- "Must be overwritten."
15
- raise NotImplementedError("shape must be overwritten.")