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 UserWarning if an invalid media_type comes to image statistics computation #891

Conversation

vinnamkim
Copy link
Contributor

@vinnamkim vinnamkim commented Mar 24, 2023

Summary

AttributeError: 'PointCloud' object has no attribute 'size'
  • However, this gives no hint for an user about what is going on behind.
  • We should inform the user that image statistics cannot be obtained because the user's dataset contains media of a type other than image media.
  • Refactor compute_image_statitiscs test to use pytest framework too
  • Ticket no. 106634

How to test

This change is covered by the unit tests.

Checklist

  • I have added unit tests to cover my changes.​
  • I have added integration tests to cover my changes.​
  • I have added the description of my changes into CHANGELOG.​
  • I have updated the documentation accordingly

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below).
# Copyright (C) 2023 Intel Corporation
#
# SPDX-License-Identifier: MIT

compute_image_statistics()

 - Refactor compute_image_statitiscs test to use pytest framework too

Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
@vinnamkim vinnamkim changed the title Add UserWarning if invalid media_type comes to Add UserWarning if an invalid media_type comes to image statistics computation Mar 24, 2023
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
@vinnamkim vinnamkim marked this pull request as ready for review March 24, 2023 06:36
@vinnamkim vinnamkim added this to the 1.2.0 milestone Mar 24, 2023
@vinnamkim vinnamkim added the BUG Something isn't working label Mar 24, 2023
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
@codecov-commenter
Copy link

codecov-commenter commented Mar 24, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (7278c8c) 78.61% compared to head (89e49c6) 78.62%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #891      +/-   ##
===========================================
+ Coverage    78.61%   78.62%   +0.01%     
===========================================
  Files          205      205              
  Lines        25067    25076       +9     
  Branches      5029     5031       +2     
===========================================
+ Hits         19706    19717      +11     
+ Misses        4229     4228       -1     
+ Partials      1132     1131       -1     
Flag Coverage Δ
macos-11_Python-3.8 77.61% <100.00%> (+0.01%) ⬆️
ubuntu-20.04_Python-3.8 78.62% <100.00%> (+0.01%) ⬆️
windows-2019_Python-3.8 78.56% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
datumaro/components/operations.py 83.97% <100.00%> (+0.29%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@vinnamkim vinnamkim merged commit 1748398 into openvinotoolkit:develop Mar 24, 2023
@vinnamkim vinnamkim deleted the bugfix/image-stats-for-invalid-media-type branch March 24, 2023 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants