onnx / tutorials

Tutorials for creating and using ONNX models
Apache License 2.0
3.39k stars 629 forks source link

missing asset dependencies for ONNXRuntimeserverSSDModel #210

Closed quantum-fusion closed 4 years ago

quantum-fusion commented 4 years ago

Bug Report

If the model conversion is failing for a tutorial in this repo, report the bug here. However, if the bug is related to general model conversion, please go to the appropriate converter repo.

Describe the bug

Please describe the bug clearly and concisely.

The OnnxRuntimeServerSSDModel Jupiter notebook requires two dependencies. https://github.com/onnx/tutorials/blob/master/tutorials/OnnxRuntimeServerSSDModel.ipynb

These dependencies are missing: import assets.onnx_ml_pb2 as onnx_ml_pb2 import assets.predict_pb2 as predict_pb2

System information

Reproduction instructions

Execute the ipynb script

ModuleNotFoundError: No module named 'onnx_ml_pb2'

Expected behavior

A clear and concise description of what you expected to happen.

Notes

Any additional information

quantum-fusion commented 4 years ago

I found the missing dependencies here, but need to know how to link them in, and want to know why they were missing from your example. (https://github.com/kreuks/onnx-serving/tree/master/microservice)

snnn commented 4 years ago

I can run it:

/tmp$ git clone https://github.com/onnx/tutorials
Cloning into 'tutorials'...
remote: Enumerating objects: 589, done.
remote: Total 589 (delta 0), reused 0 (delta 0), pack-reused 589
Receiving objects: 100% (589/589), 35.27 MiB | 58.44 MiB/s, done.
Resolving deltas: 100% (272/272), done.
/tmp$ cd tutorials/
/tmp/tutorials$ ls
examples  LICENSE  pytorch_caffe2_docker.md  PyTorchCustomOperator  README.md  tutorials
/tmp/tutorials$ cd tutorials/
/tmp/tutorials/tutorials$ ls
assets                                                 OnnxRuntimeServerSSDModel.ipynb
Caffe2OnnxExport.ipynb                                 OnnxTensorflowExport.ipynb
ChainerOnnxExport.ipynb                                OnnxTensorflowImport.ipynb
CntkOnnxExport.ipynb                                   output
CorrectnessVerificationAndPerformanceComparison.ipynb  PytorchAddExportSupport.md
ExportModelFromPyTorchForWinML.md                      PytorchCaffe2MobileSqueezeNet.ipynb
MXNetONNXExport.ipynb                                  PytorchCaffe2SuperResolution.ipynb
OnnxCaffe2Import.ipynb                                 PytorchOnnxExport.ipynb
OnnxCntkImport.ipynb                                   PytorchTensorflowMnist.ipynb
OnnxCoremlImport.ipynb                                 TensorflowToOnnx-1.ipynb
OnnxMenohHaskellImport.ipynb                           TensorflowToOnnx-2.ipynb
OnnxMxnetImport.ipynb                                  VersionConversion.md
ONNXMXNetServer.ipynb                                  VisualizingAModel.md
/tmp/tutorials/tutorials$ cat > 1.py
import numpy as np
import assets.onnx_ml_pb2 as onnx_ml_pb2
import assets.predict_pb2 as predict_pb2
import requests
from PIL import Image
import matplotlib.pyplot as plt
import matplotlib.patches as patches
/tmp/tutorials/tutorials$ python3 1.py
quantum-fusion commented 4 years ago

yes I found the files in assets, and it ran.

quantum-fusion commented 4 years ago

thank you

quantum-fusion commented 4 years ago

Do you know the answer to this question? https://github.com/onnx/tutorials/issues/211

snnn commented 4 years ago

Please follow the tutorial.