Conversation
rkazants
left a comment
There was a problem hiding this comment.
This is not needed. You can always use reshape method for ov.Model to set static shapes, for example.
Does that mean this TODO here is stale and specifying input_shapes through the cli will not be added in the future? I believe it may be nice to allow users to specify static input shapes through the optimum CLI directly instead of having to use the OpenVINO APIs after doing Original ticket |
|
Makes sense to me to leave the possibility for users to specify the input shapes to use during model conversion via the CLI, like what we have with ONNX https://github.com/huggingface/optimum-onnx/blob/v0.1.0/optimum/commands/export/onnx.py#L259 optimum-cli export openvino --model microsoft/resnet-50 --batch_size 2 --num_channels 3 --height 224 --width 224 output_dir@rkazants @danielliuce what do you think ? |
I agree. |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
For the sake of usability and maintainability, I believe we should ensure consistency across the optimum-cli utility. OpenVINO should use argument names and conventions similar to other backends like ONNX. Treating OpenVINO differently introduces confusion for users, complicates documentation and automation, and makes the CLI harder to maintain. Unless there’s a strong technical reason, I recommend aligning OpenVINO’s interface with the established patterns used by other tools. |
optimum-onnx is not a reference for us. |
Thanks for the response.
Is my understanding correct? |
What does this PR do?
Fixes Issue # 1581
Tested with command:
optimum-cli export openvino -m microsoft/resnet-50 --batch_size 1 --num_channels 3 --height 224 --width 224 static_shapesand looked at the OpenVINO IR to see that the input shapes were the same as specifiedTested with
optimum-cli export openvino -m microsoft/resnet-50 testingand looked at the OpenINO IR to see that the input shapes were -1 indicating that they were dynamicInspected the OpenVINO XML IR and saw that the input shapes were static and specified
Before submitting