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

Op stack #112

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Op stack #112

wants to merge 13 commits into from

Conversation

qmpzzpmq
Copy link
Contributor

No description provided.

@qmpzzpmq
Copy link
Contributor Author

@BBuf hi i had some problem in this PR. during the test_stack.py, it showed:

+ python test_stack.py
Converting model to onnx....
ONNX Failed to infer shapes and dtypes for [m-stack-0_reshape, type: Reshape]
Traceback (most recent call last):
  File "/home/qmpzzpmq/miniconda3/envs/of/lib/python3.8/site-packages/oneflow_onnx-0.6.2-py3.8.egg/oneflow_onnx/schemas.py", line 167, in InferOnnxShapeDtype
    inferred_model = shape_inference.infer_shapes(model_proto)
  File "/home/qmpzzpmq/miniconda3/envs/of/lib/python3.8/site-packages/onnx/shape_inference.py", line 40, in infer_shapes
    inferred_model_str = C.infer_shapes(
RuntimeError: Input 1 is out of bounds.
Succeed converting model, save model to ./temp/model.onnx
Traceback (most recent call last):
  File "test_stack.py", line 50, in <module>
    test_stack()
  File "test_stack.py", line 47, in test_stack
    convert_to_onnx_and_check(stack_graph, onnx_model_path="./temp")
  File "/home/qmpzzpmq/miniconda3/envs/of/lib/python3.8/site-packages/oneflow_onnx-0.6.2-py3.8.egg/oneflow_onnx/oneflow2onnx/util.py", line 123, in convert_to_onnx_and_check
  File "/home/qmpzzpmq/miniconda3/envs/of/lib/python3.8/site-packages/oneflow_onnx-0.6.2-py3.8.egg/oneflow_onnx/oneflow2onnx/util.py", line 33, in run_onnx
  File "/home/qmpzzpmq/miniconda3/envs/of/lib/python3.8/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 360, in __init__
    self._create_inference_session(providers, provider_options, disabled_optimizers)
  File "/home/qmpzzpmq/miniconda3/envs/of/lib/python3.8/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 397, in _create_inference_session
    sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model)
onnxruntime.capi.onnxruntime_pybind11_state.InvalidGraph: [ONNXRuntimeError] : 10 : INVALID_GRAPH : Load model from ./temp/model.onnx failed:This is an invalid model. In Node, ("m-stack-0_reshape", Reshape, "", -1) : ("m-stack-0_unsqueeze:0": tensor(float),) -> ("m-stack-0/out_0": tensor(float),) , Error Node (m-stack-0_reshape) has input size 1 not in range [min=2, max=2].

it seems like this problem:
onnx/onnx#2558, is possible check this?

@qmpzzpmq
Copy link
Contributor Author

@BBuf done, with review it.

Copy link
Contributor

@BBuf BBuf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qmpzzpmq
Copy link
Contributor Author

@BBuf done

@BBuf BBuf requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 22, 2023 07:10
@BBuf
Copy link
Contributor

BBuf commented Feb 22, 2023

@BBuf done

format failed,please use black1.19.0 to format this pr. https://github.com/Oneflow-Inc/oneflow_convert/actions/runs/4240287421/jobs/7369160390

@qmpzzpmq
Copy link
Contributor Author

qmpzzpmq commented Feb 22, 2023

actually the version in your link is "19.10b0"

@qmpzzpmq
Copy link
Contributor Author

actually with the version of black "19.10b0"
there is issue:
https://stackoverflow.com/questions/71673404/importerror-cannot-import-name-unicodefun-from-click

@xiezipeng-ML xiezipeng-ML requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 23, 2023 09:40
@qmpzzpmq
Copy link
Contributor Author

@BBuf done

@BBuf BBuf requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 26, 2023 14:37
@BBuf BBuf requested review from oneflow-ci-bot and removed request for oneflow-ci-bot March 7, 2023 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants