Skip to content

Commit 32e5d55

Browse files
authored
documentation (#53)
1 parent f2f1195 commit 32e5d55

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

README.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,18 @@ onnx-diagnostic: investigate onnx models
2525
.. image:: https://codecov.io/gh/sdpython/onnx-diagnostic/branch/main/graph/badge.svg?token=Wb9ZGDta8J
2626
:target: https://codecov.io/gh/sdpython/onnx-diagnostic
2727

28-
Helps investigating onnx models, exporting modes into onnx.
29-
See `documentation of onnx-diagnostic <https://sdpython.github.io/doc/onnx-diagnostic/dev/>`_.
28+
The main feature is about `patches <https://github.com/sdpython/onnx-diagnostic/tree/main/onnx_diagnostic/torch_export_patches>`_:
29+
it helps exporting **pytorch models into ONNX**, mostly designed for LLMs using dynamic caches.
30+
31+
.. code-block:: python
32+
33+
with bypass_export_some_errors(patch_transformers=True) as f:
34+
ep = torch.export.export(model, args, kwargs=kwargs, dynamic_shapes=dynamic_shapes)
35+
# ...
36+
37+
It also implements tools to investigate, validate exported models (ExportedProgramm, ONNXProgram, ...).
38+
See `documentation of onnx-diagnostic <https://sdpython.github.io/doc/onnx-diagnostic/dev/>`_ and
39+
`bypass_export_some_errors <https://sdpython.github.io/doc/onnx-diagnostic/dev/api/torch_export_patches/index.html#onnx_diagnostic.torch_export_patches.bypass_export_some_errors>`_.
3040

3141
Getting started
3242
+++++++++++++++

_doc/index.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@ onnx-diagnostic: investigate onnx models
1818
.. image:: https://codecov.io/gh/sdpython/onnx-diagnostic/branch/main/graph/badge.svg?token=Wb9ZGDta8J
1919
:target: https://codecov.io/gh/sdpython/onnx-diagnostic
2020

21-
**onnx-diagnostic** helps investigating onnx models, exporting models into onnx.
22-
It implements tools used to understand issues.
21+
The main feature is about `patches <https://github.com/sdpython/onnx-diagnostic/tree/main/onnx_diagnostic/torch_export_patches>`_:
22+
it helps exporting **pytorch models into ONNX**, mostly designed for LLMs using dynamic caches.
2323

24-
Source are `sdpython/onnx-diagnostic
25-
<https://github.com/sdpython/onnx-diagnostic>`_.
24+
.. code-block:: python
25+
26+
with bypass_export_some_errors(patch_transformers=True) as f:
27+
ep = torch.export.export(model, args, kwargs=kwargs, dynamic_shapes=dynamic_shapes)
28+
# ...
29+
30+
It also implements tools to investigate, validate exported models (ExportedProgramm, ONNXProgram, ...).
31+
:func:`onnx_diagnostic.torch_export_patches.bypass_export_some_errors`.
2632

2733
.. toctree::
2834
:maxdepth: 1
@@ -166,6 +172,8 @@ Size of the package:
166172
Older versions
167173
++++++++++++++
168174

175+
* `0.4.0 <../v0.4.0/index.html>`_
176+
* `0.3.0 <../v0.3.0/index.html>`_
169177
* `0.2.2 <../v0.2.2/index.html>`_
170178
* `0.2.1 <../v0.2.1/index.html>`_
171179
* `0.2.0 <../v0.2.0/index.html>`_

0 commit comments

Comments
 (0)