Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Amending ONNX importer/exporter #11213 #11475

@zhreshold

Description

@zhreshold

This thread tracks additional concerns of PR #11213

Naming of modules in python/mxnet/contrib/onnx:

  • onnx2mx/mx2onnx, from the perspective of inside mxnet python package, it is more reasonable to use name from_onnx/to_onnx.
  • Please be considerate about modules and their purposes before spreading to many files. For example, https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/contrib/onnx/mx2onnx/_export_helper.py don't necessarily need to be a separate module, a private function in export_onnx.py is more appropriate.
  • import_model/import_onnx/import_to_gluon.py are basically doing similar things, just put them in import_onnx.py. Same story for export_model/export_onnx.
  • Name of highest level APIs, e.g., import_model, get_model_metadata, import_to_gluon, export_model are totally dummy and missing valid info. I suggest to use import_onnx, get_onnx_metadata, export_onnx, import_to_gluon can be deleted and merged as an option for example import_onnx(to_gluon=True)

Testing

It's a minor issue compared to naming.

  • onnx unittest is special because it relies on onnx.tests
  • In near future I don't expect other modules to use pytest

Based on these, I think python-pytest is not a good place to go, and onnx deserves a separate test folder due to it's special dependency.

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions