onnx / onnxmltools

ONNXMLTools enables conversion of models to ONNX
https://onnx.ai
Apache License 2.0
1.02k stars 183 forks source link

ONNX CLI #343

Open joshthoward opened 5 years ago

joshthoward commented 5 years ago

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?

jiafatom commented 5 years ago

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

joshthoward commented 5 years ago

@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