-
Notifications
You must be signed in to change notification settings - Fork 742
Fix to torch_inferencer pre_process trying to use 'to(device)' on a n… #1816
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
Fix to torch_inferencer pre_process trying to use 'to(device)' on a n… #1816
Conversation
…umpy istance with broken shape Signed-off-by: AndreaDor <[email protected]>
7d63352
to
4a5de6c
Compare
Thie is my first time asking for a pr on any open source project, i am open to correct and explain what i did. Thank you |
Welcome to the community, @Sbaffinator98! Thanks a lot for your contribution! I'll be running the tests now, and we will be reviewing your PR shortly. Thanks again! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Sbaffinator98, thank you for addressing this. I've added some suggestions to fix the code-quality checks. If you want to re-produce it on your side, you could do the following from your terminal:
pip install pre-commit
pre-commit run -a
Hello i saw that you guys commited some clean-code. I see that is still failing the checks. I dont see any torch_inferencer related issue. What should i do further? |
The tests are failing for some reason here I'll check why they fail |
Hi @Sbaffinator98, thanks for your patience, and apologies for going over this pr a bit late. |
Fix to torch_inferencer pre_process trying to use 'to(device)' on a n…umpy istance with broken shape
📝 Description
Provided the fix by making a .transpose of the ndarray coming in and exporting the result with torch.from_numpy(ndarray).to(device) instead of ndarray.to(device)
On my fork on branch 501a_torch_fix can be found the .ipynb with the implementation on the cubes training/inference with OpenVino but also with the TorchInferencer
✨ Changes
Select what type of change your PR is:
✅ Checklist
Before you submit your pull request, please make sure you have completed the following steps: