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

Add a clear error message when creating an empty Constant #19617

Closed
p-wysocki opened this issue Sep 5, 2023 · 4 comments · Fixed by #19674
Closed

Add a clear error message when creating an empty Constant #19617

p-wysocki opened this issue Sep 5, 2023 · 4 comments · Fixed by #19674
Assignees
Labels
good first issue Good for newcomers no_stale Do not mark as stale
Milestone

Comments

@p-wysocki
Copy link
Contributor

Context

Current Constant implementation does not allow for creating empty Constants:
https://docs.openvino.ai/2023.0/openvino_docs_ops_infrastructure_Constant_1.html

Trying to do so results in a cryptic error message:

IndexError: index 0 is out of bounds for axis 0 with size 0

What needs to be done?

  1. Add a clear error message for the user trying to create an empty Constant
    This can be done in either Python wrapper: https://github.com/openvinotoolkit/openvino/blob/master/src/bindings/python/src/openvino/runtime/opset1/ops.py#L334-L347
    Or in C++ to Python binding: https://github.com/openvinotoolkit/openvino/blob/master/src/bindings/python/src/pyopenvino/graph/ops/constant.cpp

It's up to you to decide where the error message implementation will be a good fit.

  1. Make sure the error message appears
    This can be done either manually or by writing a test.

  2. Create a Pull Request

Resources

Contact points

@p-wysocki
@jiwaszki
@akuporos

Don't hesitate to reach out, we're here to help!

Ticket: 114374

@p-wysocki p-wysocki added good first issue Good for newcomers no_stale Do not mark as stale labels Sep 5, 2023
@p-wysocki p-wysocki changed the title Add a clear error message when creating an empty Constant Add a clear error message when creating an empty Constant Sep 5, 2023
@p-wysocki
Copy link
Contributor Author

PR: #19674

@p-wysocki
Copy link
Contributor Author

The PR has been merged. Thank you @siddhant-0707!

@siddhant-0707
Copy link
Contributor

Glad to help! 😃

@p-wysocki
Copy link
Contributor Author

I'm moving the issue to the completed section in Contributions Welcome list.

@ilya-lavrenov ilya-lavrenov added this to the 2023.2 milestone Sep 18, 2023
@p-wysocki p-wysocki moved this to Contrubutors needed in Good first issues Oct 3, 2023
@p-wysocki p-wysocki moved this from Contrubutors needed to Closed in Good first issues Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers no_stale Do not mark as stale
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants