Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support assets like MXNet model server or tensorflow savedmodel #927

Closed
ydp opened this issue May 10, 2018 · 4 comments
Closed

support assets like MXNet model server or tensorflow savedmodel #927

ydp opened this issue May 10, 2018 · 4 comments

Comments

@ydp
Copy link

ydp commented May 10, 2018

I read the IR spec documents, did not find any field to represent assets like tensorflow savedModel format or MXNet model server, but that is necessary when we have vocabularies, etc.

tensorflow savedModel

Assets
    Subfolder called assets.
    Contains auxiliary files such as vocabularies, etc.
Extra assets
    Subfolder where higher-level libraries and users can add their own assets that co-exist with the model, but are not loaded by the graph.
    This subfolder is not managed by the SavedModel libraries.

MXNet model server:

Model Definition (json file) - contains the layers and overall structure of the neural network
Model Params and Weights (params file) - contains the parameters and the weights
Model Signature (json file) - defines the inputs and outputs that MMS is expecting to hand-off to the API
assets (text files) - auxiliary files that support model inference such as vocabularies, labels, etc. and vary depending on the model
@gramalingam
Copy link
Contributor

Seems related to: https://github.com/onnx/onnx/wiki/%5Bdraft%5D-Proposal-for-ONNX-archive-file-format (at least partially).

@dzhulgakov
Copy link
Member

Yes, for packaging parameters in a better form we're trying to use https://github.com/onnx/onnx/wiki/%5Bdraft%5D-Proposal-for-ONNX-archive-file-format

For model signature - there's some work in #879 to experiment with possible annotations.

For other assets - we can basically allow arbitrary files inside the archive. It'd be a bit harder to align the semantics of using assets across frameworks. What's the use case you have in mind to start?

@ydp
Copy link
Author

ydp commented May 24, 2018

Thanks for reply.

In my cases, I need to handle embedding in DNN models, to be more specifically, we have user ID and item ID in almost all recommender system or CTR algorithm, those IDs need to store in file, the format is one ID each line, the ID could be numbers or strings.

In the proposed format above, I guess we can refer each IDs list in a file, and compress all IDs list file in the zip file, don't know if this is the correct usage of this format. Would it be better if we have an example model for the format.

@quantum-fusion
Copy link

Where do these assets come from? The problem is that I only have an ONNX model from the model zoo. (https://github.com/onnx/models)

These two files are missing from the model zoo.

The missing files needed are:
signature.json - defining the input and output of the model
synset.txt - defining the set of classes the model was trained on, and returned by the model


Model Definition (json file) - contains the layers and overall structure of the neural network
Model Params and Weights (params file) - contains the parameters and the weights
Model Signature (json file) - defines the inputs and outputs that MMS is expecting to hand-off to the API
assets (text files) - auxiliary files that support model inference such as vocabularies, labels, etc. and vary depending on the model

missing file dependencies
#2944

@askhade askhade closed this as completed Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants