This will turn our docs build job red (see first commit) if there are
any broken internal anchors etc. Repository-links in the markdown files
are re-written on-the-fly to urls pointing to the appropriate file on
github.com (all those links are currently broken in the docs hosted on
onnx.ai).
Related to #8291
---------
Signed-off-by: Christian Bourjau <christian.bourjau@quantco.com>
The code snippets in `PythonAPIOverview.md` are currently not executed.
Instead, there were some (broken) links to jupyter notebooks that
essentially contained copies of the example code.
This PR removes this redundancy and executes code snippets directly
where it makes sense. The notebooks are removed since they provided very
little further utility and are not referenced from elsewhere. The
snippet working on a "Pad" node was actually broken and is fixed in this
PR.
In the larger picture, this entire file should probably be removed.
Instead, this information should be moved to the docstrings for the
respective functions which is already more prominently exposed in the
docs. Nonetheless, this PR seems like a reasonable stopgap-solution,
IMHO.
Signed-off-by: Christian Bourjau <christian.bourjau@quantco.com>
Co-authored-by: Andreas Fehlner <fehlner@arcor.de>
### Motivation and Context
Fixes several documentation typos and grammar errors found in the Python
API documentation:
1. **`docs/PythonAPIOverview.md`**: "Please checker onnx.helper" →
"Please check onnx.helper"
2. **`docs/docsgen/source/api/index.md`**: "modifying one them" →
"modifying one of them"
3. **`docs/docsgen/source/api/index.md`**: "An ONNX model can be
directly from" → "An ONNX model can be created directly from"
These are small but affect the readability of the official
documentation.
Signed-off-by: Chessing234 <Chessing234@users.noreply.github.com>
Signed-off-by: Taksh <takshkothari09@gmail.com>
### Description
This PR fixes several issues detected by markdownlint-cli2
<!-- - Describe your changes. -->
### Motivation and Context
Better documentation.
<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->
---------
Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>
### Description
<!-- - Describe your changes. -->
Format and remove white space in the docs by markdownlint-cli2. The aim
is enable the tool in CI.
### Motivation and Context
Better docs
<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->
Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>
### Description
Small PR - Commit c1bd5cca13 moved the
notebook examples. This PR adjusts sources to changes.
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
### Description
This PR corrects the `Pad` operator example in the Python API
documentation. The original code incorrectly treated `value` as an input
tensor and used an invalid `pads` data type. The updated example sets
`value` as a float attribute, uses `INT64` for `pads`, and includes
OPSET 11 compatibility.
### Motivation and Context
The incorrect example could lead users to create invalid ONNX models.
This fix ensures the documentation reflects proper usage of the `Pad`
operator and ONNX standards, improving the developer experience.
Signed-off-by: vivek kolasani kolasaniv1996@gmail.com
Signed-off-by: EC2 Default User <ec2-user@ip-172-31-73-195.ec2.internal>
Co-authored-by: EC2 Default User <ec2-user@ip-172-31-73-195.ec2.internal>
* Modify existing function and add a new function to convert raw data as external data to allow converting attributes and saving the model
Signed-off-by: Anna Jung (VMware) <antheaj@vmware.com>
* Modify existing save model api to optionally convert and save as external data
Signed-off-by: Anna Jung (VMware) <antheaj@vmware.com>
* Add a fix for a few nits in the comment
Signed-off-by: Anna Jung (VMware) <antheaj@vmware.com>
Co-authored-by: Ashwini Khade <askhade@microsoft.com>
* util: function to extract part of an ONNX model
Sometimes, people would like to _extract_ part of an
model for development, validation or other purposes.
With `onnx.util.extract`, this is doable by specifying
the input and output tensor names of the subgraph.
Signed-off-by: Zhenhua Wang <zhenhuaw@nvidia.com>
* Address review comments #1
* Re-style function of Extractor
* Reject empty input/output names
* Misc change for readibility
* Type annotation
Signed-off-by: Zhenhua Wang <zhenhuaw@nvidia.com>
* Try to enable full_check
* revert meaningless modification
This reverts commit fdaa6a91eae123f68141370aafa13841551b0295, reversing
changes made to 40d56bd08714534edca3dae674d82aba1a7356de.
Debug for all_types
Revert "Debug for all_types"
This reverts commit 3aa921a9ea7d82080265d1d95b7ec6cf3cdfa343.
restore onnx
This reverts commit fdaa6a91eae123f68141370aafa13841551b0295, reversing
changes made to 40d56bd08714534edca3dae674d82aba1a7356de.
Debug for all_types
Revert "Debug for all_types"
This reverts commit 3aa921a9ea7d82080265d1d95b7ec6cf3cdfa343.
Revert "restore onnx"
This reverts commit aadc4da654960c8248b502dd71a592d95eafd6db.
restore onnx due to gitignore them unintentionally
This reverts commit fdaa6a91eae123f68141370aafa13841551b0295, reversing
changes made to 40d56bd08714534edca3dae674d82aba1a7356de.
Debug for all_types
Revert "Debug for all_types"
This reverts commit 3aa921a9ea7d82080265d1d95b7ec6cf3cdfa343.
restore onnx
This reverts commit fdaa6a91eae123f68141370aafa13841551b0295, reversing
changes made to 40d56bd08714534edca3dae674d82aba1a7356de.
Debug for all_types
Revert "Debug for all_types"
This reverts commit 3aa921a9ea7d82080265d1d95b7ec6cf3cdfa343.
Revert "restore onnx"
This reverts commit aadc4da654960c8248b502dd71a592d95eafd6db.
* Accumulate error msgs for checker
* Accumulate error messages and trigger runtime error while checking type consistency.
Print type consistency
add nextline between various error msgs
add nextline
* Change external tensors into default after loading; Add filepath field;
pass to checker with filepath
* Decouple the check of inference error to another PR
* Revert the commit of introducing model_path in model proto
* Add warning for large models which is > 2GB
* Improve catching 2GB
* Use (str, Warning) to prevent (unicode) error
* Force to use string
* Use expcetion instead of warning for catching large models
* add comments for load external data
* test check 2gb
* Change to ValueError from RuntimeError for 2GB models
* Refactor external data test and use iteration to avoid memory exceed
* Create ExternalData.md
* Add usage for using external data
* load and checker for external data in PythonAPI
* Add a link to ExternalData.md in IR.md
Co-authored-by: Vinitra Swamy <vinitras@gmail.com>
Co-authored-by: G. Ramalingam <grama@microsoft.com>
* Edited PythonAPIOverview.md
The example given in the "Creating an ONNX Model Using Helper
Functions" example.
* Edited PythonAPIOverview.md
The example given in the "Creating an ONNX Model Using Helper
Functions" example was not working as expected.
Running the given code would throw a ValidationError() regarding
the node specification (i.e.: "Context: Bad node spec").
This change uses the current node specification, solving the issue.
* Add a helper function update_inputs_outputs_dims to tools
* fix link to doc
* newline at the end
* add test for tools
* doc props
* nit
* ci tests
* ci tests 2
* accept shapes by dictionary inputs and add more error handling
* Update onnx/tools/update_model_dims.py
nit: rephrasing
Co-Authored-By: Wei-Sheng Chin <wschin@outlook.com>
* remove debug line
* fix type annotation
* fix annotation
* fix annotation
* fix annotation
* fix flake8
* Initial version converter skeleton
* Adapter interface, more complete conversion procedure
* More fleshed out procedure for version conversion
* Added map of nodes to schemas
* Registration Mechanism complete; adapter_lookup mostly there
* Initial adapter_lookup finished
* Added opset_version handler to ir_pb_converter
* Debugging version converter and abstraction
Summary: Basic debugging, finished initial C++ implementation of
version_converter
Test Plan: Will write tests once python interface is finished
Reviewers: lufang, smessmer
Subscribers:
Tasks:
Tags:
* Fixed IR to hold a list of opset_version
* Debugging, fixes to ir
* Only compilation error: use of unique_ptr copy constructor;
* Initial version converter skeleton
* More fleshed out procedure for version conversion
* Registration Mechanism complete; adapter_lookup mostly there
* Debugging version converter and abstraction
Summary: Basic debugging, finished initial C++ implementation of
version_converter
Test Plan: Will write tests once python interface is finished
Reviewers: lufang
Subscribers:
Tasks:
Tags:
* Fixed IR to hold a list of opset_version
* Debugging, fixes to ir
* Only compilation error: use of unique_ptr copy constructor;
* Fixed map
* Fixed map
* Reverting map to be multi-layered
* Reverting map to be multi-layered
* Fixed all compilation errors in version_converter
* Fixed all compilation errors in version_converter
* Compiling successfully
* Compiling successfully
* Version Converter Python Interface - Not Yet Functional
* Resolved Python adapter compilation issue
* More cpp2py_export changes for version_converter, as well as tests
* More cpp2py_export changes for version_converter, as well as tests
* Finished initial version_converter tests
* Finished initial version_converter tests
* Added asserts to tests and overall documentation
* Refactored ConvertVersion to take OperatorSetIdProto instead of OpSetID
* Refactored ConvertVersion to take OperatorSetIdProto instead of OpSetID
* Fixed version_converter_test to catch exceptions
* Refactored VersionConverter into BaseConverter
* Refactored VersionConverter into BaseConverter
* Fixed optimize_onnx iPython test to include domain
* Fixed optimize_onnx iPython test to include domain
* Fixed uncertainty bugs in converter; not sure how to fix lack of generated object file
* Switched sscanf to atoi
* Use int64_t
* More int conversions
* More conversions to int64_t
* uint64_t
* Added Version Converter to PythonAPIOverview
* Python annotations
* Changed indices to unsigned int instead of uint64_t; may introduce problems with size
* Added version_converter stub
* Lint Fixes for Travis Build
* Adapt now takes a node
* Addressed first round of code review except intermediate refactoring
* i hate ints
* Better constructor?
* Due to char*, use strcmp instead of ==
* Lots of refactoring to address Junjies comments
* IntraDomainConverter refactor
* Fixed version_converter stub
* Fixed version_converter stub
* Confusion about unique pointers and maps of const and undefined classes
* Documentation?
* Current version of our const bug
* Random changes
* Back to explicit constructor
* Fixes to Sebastian's comments
* Finished addressing Sebastian's recommendations'
* Fixed build problem with const references
* Addressing Lu comments on this branch
* Fixed version_converter initialization
* int64_t error in OpSetID constructor
* Another int64_t issue in incrementVersion
* Removed direct calls to barf
* Adjust Python docs, atoi to stoi
* fromString instead of string constructor
* No need for int64_t&
* Removed ONNX_NAMESPACE references
* No need for _visit_all_nodes_recursive
* Made test_backwards_incompatible actually backwards incompatible
* Fixed documentation for version_converter.py
* End of namespace comments
* Removed DEBUG flag from DefaultVersionConverter
* More code review fixes
* Move semantics
* Addressed Lu code review, started on NoPreviousVersionAdapter
* Need to check on adapters
* checking on adapters
* Fixed Adapter Interface and Cos Tests
* Addressed Sebastian's Comments
* Added comments to address Lu concerns
* Renamed opset_versions getter
* Removed all remaining ONNX_NAMESPACE references; not sure about strcmps
* Removed str_cmp
* Initial changes per Lu suggestions; still finishing automated NoPreviousVersionAdapter detection
* Getting new search from adapters
* Getting up from adapters
* Debug statements
* Added condition to verify defined op_name
* Removed tags
* Changed reference semantics per Sebastian suggestions
* No Previous Version rename
* Finished addressing Lu comments