-
Notifications
You must be signed in to change notification settings - Fork 618
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(sdk): Allow uint8 images to be logged as wandb.Image() #6043
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6043 +/- ##
==========================================
- Coverage 78.08% 78.00% -0.09%
==========================================
Files 379 379
Lines 43518 43520 +2
==========================================
- Hits 33981 33947 -34
- Misses 9485 9521 +36
Partials 52 52
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
🎉 nice, @nate-wandb @MBakirWB!! please address the minor comments, and this can go in.
also, feel free to add your future PRs to a future (target) release.
Looks like gh is having a hard time triggering circleci, will have to try again once it's working. still, need to fix the linting: https://app.circleci.com/pipelines/github/wandb/wandb/25263/workflows/e058f638-99b4-4d57-af64-80b5c75d3631/jobs/704770 |
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.
lgtm. i fixed up the test to use a temp file and a proper way to compare two np arrays
Fixes
Description
Images loaded with torchvision.io.read_image would previously crash when logged as a wandb.Image() do to being normalized. This fix converts torch.uint8 images to
float
prior to logging them to solve this.Testing
Added test_log_uint8_image() to test_data_types.py. Also passed all other tests in test_data_types.py as well and should only impact images of type torch.uint8. We also logged the randomly created image to wandb.ai with our branch and confirmed that the image created matches what is expected.
🤖 Generated by Copilot at 24f9ac6