onnxmltools icon indicating copy to clipboard operation
onnxmltools copied to clipboard

ONNX CLI

Open joshthoward opened this issue 4 years ago • 2 comments

This repo seems to be the best place for the discussion; I apologize if it has already happened elsewhere.

I believe that a more natural workflow for interacting with ONNX models would be through a CLI rather than a Python library. This would more closely mimic configuration management tools like git or docker. Is there anyone else who would like to see this?

If so, I would be open to discussing features. My wish list is below:

  1. A user should be able to use a similar interface for building ONNX models regardless of the source framework. The interface might require a the framework to be specified as a flag or accommodate slight variations between static and dynamic computation graphs, but either way, the interface should be simplified.

  2. A user should not have to deal with files directly. The interface should abstract away the method of accessing or storing files at a local or remote location.

  3. Global or project level settings should be automatically applied or inferred for model metadata e.g. metadata_props. These fields are all sparingly populated from what I have seen. This is not necessarily a CLI only feature.

  4. A user should be able to deploy models with the same interface that they retrieve them with. I am a little skeptical that this is feasible, but it would be convenient.

I would be interested in spending some time to get this off the ground.

Thoughts?

joshthoward avatar Oct 15 '19 03:10 joshthoward

We have CLI for keras2onnx converter that users can directly use here. For other converters, welcome to contribute :)

jiafatom avatar Oct 23 '19 22:10 jiafatom

@jiafatom I am super glad that you guys went that direction, but I don't think that a Keras specific library would be the best home for a cross-framework tool.

I've been toying with this idea a bit (essentially just creating an interface). The usage is listed here https://github.com/joshthoward/onnx-cli/blob/master/README.md

joshthoward avatar Oct 29 '19 13:10 joshthoward