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

Refactor convert_inputs_to_tensors decorator to move automatic shape conversion logic to a separate helper #214

Closed
pranavm-nvidia opened this issue Sep 19, 2024 · 1 comment
Assignees

Comments

@pranavm-nvidia
Copy link
Collaborator

Right now, the convert_inputs_to_tensors decorator is doing far too much: not only does it convert inputs to tensors and cast them, it can also convert them to shape tensors. The first part of its functionality should be restricted to operator overloads only - we don't want other APIs to do any implicit casting or conversion. The second part can be applied more broadly to make it easy to write ergonomic code.

To achieve this we can split the decorator so that the functionality that converts arguments to shape tensors is provided as a separate decorator.

We will probably also need to update _make_stack_info_message in tripy/tripy/common/exception.py to omit this decorator from the stack information when generating error messages.

@pranavm-nvidia
Copy link
Collaborator Author

Implemented by #217

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

No branches or pull requests

2 participants