-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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 output data type of image classification #31444
fix output data type of image classification #31444
Conversation
Also, for the failed CI, it seems like not all tensors can be converted to |
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.
Thanks for working on a fix for this!
We'll need to protect the float cast and add tests to check the pipeline works when torch_dtype
is set to float16
or bfloat16
Hi @amyeroberts . Thanks for your review. I have fixed your comments and added a test for the low-precision pipeline, but the CI seems to be going wrong. Can you help check the test? Thx! And other task pipelines also have this issue. I would like to hear your opinion and then change the rest of pipelines :) |
Hi @amyeroberts. Can you take a look at the new changes? If it is okay for you, I will update all other pipelines to support low precision. |
Hi @amyeroberts . Could you please take a review? The failed CIs are not related to my changes :) I am waiting for your comments to change the rest of the pipelines to support it. Thx! |
Hi @amyeroberts . I have rebased and passed all CIs. Would you please review them? |
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.
Thanks for adding!
Just a small request to add a test for bfloat16 too
Hi @amyeroberts . I have added |
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.
Thanks for fixing!
Just some small nits and we're ready to merge!
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
HI @amyeroberts . I have fixed the import issue, please take a review, thx! |
Hi @Narsil . I found an issue when running the low-precision pipeline of image-classification:
Error log:
We need to convert the output tensor to
float32
so it can be converted tonumpy
.