feat : better support for onnx graph import and inputs/outputs
Context
Add some corner test cases and fix ONNX model import for managing better:
- multiple reference of the same output name
- ordering of inputs and outputs, when some are ignored/unused/undefined they are ignored in the final Aidge ordered inputs/outputs list,
- forward references of output names, resolved to the first forward definition (allows cyclic graphs)
- multiple references to inputs, for which some identity nodes must be created
Actually the transformation to the input ONNX schedules data dependence graph, expected to be a topological order of nodes, to the Aidge data flow graph (static single definitions) is now done in a separate functions which computes and unambiguous DFG given the above choices.
Modified files
First commit:
-
test_unit_cases_import.py
/test_unit_cases_import_forward.py
: new file adding some unit test cases for corner cases -
onnx_helpers.py
: add utility function for creating ONNX graph from simple test cases described as dict -
test_import_export.py
: minor changes
Second commit:
-
onnx_import.py
: add_get_dataflow_graph()
function and rewrite import. All previously importable graphs are still importable. - update test cases now passing
Detailed major modifications
The ONNX import now defined the ordered inputs, through set_ordered_inputs
.
Add new tests with corner cases in new test files: test_unit_cases_import.py
/test_unit_cases_import_forward.py
TODO
-
Merge or iterate over MR !75 (merged) and MR !76 (merged) first
Merge request reports
Activity
added 10 commits
- 2d871c1b - [Test] Add import tests of ONNX Nodes test suite
- f40e2594 - [utils] Fix get_node_attributes()
- f15299c3 - [utils] Fix warn_unsupported_attribute() function
- 3a05c5a9 - [Reshape] Add support for opset > 19
- 3dbdf291 - [LeakyRelu] Fix default attributes
- eb2751c9 - [Slice] Add support for optional inputs
- 9d421985 - [Split] Fix support for optional inputs
- 3305a8f8 - [Shape] Fix shape import implementation
- 56289b02 - [Test] Add some import test cases
- d861c197 - [Import] Better support for onnx graph import and inputs/outputs
Toggle commit listadded 1 commit
- 00a96bf6 - [Import] Better support for onnx graph import and inputs/outputs
added 10 commits
- 75a54fa1 - [Test] Add import tests of ONNX Nodes test suite
- d270a6b3 - [utils] Fix get_node_attributes()
- a7dfeb4a - [utils] Fix warn_unsupported_attribute() function
- 551ab302 - [Reshape] Add support for opset > 19
- 51e72d8b - [LeakyRelu] Fix default attributes
- 7d764d95 - [Slice] Add support for optional inputs
- b7446c94 - [Split] Fix support for optional inputs
- 79bbe91d - [Shape] Fix shape import implementation
- c5a48d36 - [Test] Add some import test cases
- 330cd4c0 - [Import] Better support for onnx graph import and inputs/outputs
Toggle commit listmentioned in merge request !87 (merged)
mentioned in issue #40 (closed)
- Resolved by Christophe Guillon
@cguillon Lets continue the merges, could you rebase this one?
added 44 commits
-
330cd4c0...47fc9879 - 42 commits from branch
eclipse/aidge:dev
- 80f8055e - feat : add tests for some import corner cases
- 6bc203c6 - feat : better support for onnx graph import and inputs/outputs
-
330cd4c0...47fc9879 - 42 commits from branch
marked the checklist item Merge or iterate over MR !75 (merged) and MR !76 (merged) first as completed
mentioned in commit 178477d4
assigned to @cguillon
requested review from @olivierbichler
mentioned in issue #47 (closed)
mentioned in issue #50 (closed)