Skip to content

Conversation

@mvafin
Copy link
Contributor

@mvafin mvafin commented Jun 17, 2024

Details:

  • Some PyTorch models may have dicts, lists, tuples as inputs. We unpack them on normalize step in PT FE, but this means that those unpacked inputs do not exist before conversion and convert_model can't set shapes/types for them. This PR adds ability for convert_model to set shapes/types to any arbitrary input obtained by index or name.

Tickets:

@mvafin mvafin requested review from a team as code owners June 17, 2024 10:05
@mvafin mvafin requested review from PiotrKrzem and slyalin June 17, 2024 10:05
@github-actions github-actions bot added category: MO Model Optimizer category: Core OpenVINO Core (aka ngraph) category: Python API OpenVINO Python bindings category: CPP API OpenVINO CPP API bindings category: PyTorch FE OpenVINO PyTorch Frontend labels Jun 17, 2024
@mvafin mvafin requested review from a team as code owners June 18, 2024 10:14
@github-actions github-actions bot added category: ONNX FE OpenVINO ONNX FrontEnd category: PDPD FE OpenVINO PaddlePaddle FrontEnd category: TF FE OpenVINO TensorFlow FrontEnd category: TFL FE OpenVINO TensorFlow Lite FrontEnd labels Jun 18, 2024
@mvafin mvafin requested a review from rkazants June 18, 2024 10:20
@mvafin mvafin added this to the 2024.3 milestone Jun 26, 2024
@mvafin mvafin requested review from popovaan and rkazants June 26, 2024 11:01
@mvafin mvafin requested a review from rkazants June 27, 2024 14:47
Comment on lines +76 to +82
enabled_transforms, disabled_transforms = get_enabled_and_disabled_transforms()
if 'ANALYSIS_JSON_PRINT' in enabled_transforms:
# NOTE that model analysis is performed before applying user's settings (inputs's shapes etc.)
framework_model = moc_front_end.decode(input_model)
json_model_analysis_dump(framework_model)
# a model is not processed further in json analysis mode
sys.exit(0)
Copy link
Contributor Author

@mvafin mvafin Jun 27, 2024

Choose a reason for hiding this comment

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

It was moved unchanged. To preserve behavior and avoid duplication

Copy link
Collaborator

@rkazants rkazants left a comment

Choose a reason for hiding this comment

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

please add only changes required for PyTorch and put it under separate if. No need to move helper functions to else

@mvafin mvafin requested a review from rkazants June 27, 2024 15:55
@mvafin
Copy link
Contributor Author

mvafin commented Jun 27, 2024

@rkazants I moved no helper functions

@mvafin mvafin requested a review from rkazants June 27, 2024 16:03
@mvafin mvafin requested a review from rkazants June 27, 2024 21:25
@mvafin mvafin added this pull request to the merge queue Jul 1, 2024
Merged via the queue into openvinotoolkit:master with commit a3d2b6a Jul 1, 2024
@mvafin mvafin deleted the mvafin/pt_fe/input_for_nested_structures branch July 1, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: Core OpenVINO Core (aka ngraph) category: CPP API OpenVINO CPP API bindings category: MO Model Optimizer category: ONNX FE OpenVINO ONNX FrontEnd category: PDPD FE OpenVINO PaddlePaddle FrontEnd category: Python API OpenVINO Python bindings category: PyTorch FE OpenVINO PyTorch Frontend category: TF FE OpenVINO TensorFlow FrontEnd category: TFL FE OpenVINO TensorFlow Lite FrontEnd

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants