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

Fix wrong __len__() of Subset when the item is removed #854

Merged
merged 3 commits into from
Mar 15, 2023

Conversation

vinnamkim
Copy link
Contributor

@vinnamkim vinnamkim commented Mar 14, 2023

Summary

  • @sungmanc reported that the subset length is not correctly obtained if we remove the item from the dataset as follows.
    MicrosoftTeams-image (4)
  • Ticket no. 105934

How to test

Added a test for this bug

Checklist

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

Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
@vinnamkim vinnamkim changed the title Fix subset length bug Fix wrong __len__() of Subset Mar 14, 2023
@vinnamkim vinnamkim changed the title Fix wrong __len__() of Subset Fix wrong __len__() of Subset when the item is removed Mar 14, 2023
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
@vinnamkim vinnamkim marked this pull request as ready for review March 14, 2023 06:03
@vinnamkim vinnamkim added the BUG Something isn't working label Mar 14, 2023
@codecov-commenter
Copy link

codecov-commenter commented Mar 14, 2023

Codecov Report

Patch coverage: 66.66% and project coverage change: -0.08 ⚠️

Comparison is base (21755d3) 78.59% compared to head (3b1dc83) 78.51%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #854      +/-   ##
===========================================
- Coverage    78.59%   78.51%   -0.08%     
===========================================
  Files          198      194       -4     
  Lines        24377    24268     -109     
  Branches      4932     4914      -18     
===========================================
- Hits         19159    19055     -104     
+ Misses        4118     4116       -2     
+ Partials      1100     1097       -3     
Flag Coverage Δ
macos-11_Python-3.8 ?
ubuntu-20.04_Python-3.8 ?
windows-2019_Python-3.8 78.51% <66.66%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
datumaro/components/dataset.py 82.14% <66.66%> (-0.28%) ⬇️

... and 6 files with indirect coverage changes

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.

sungmanc
sungmanc previously approved these changes Mar 14, 2023
Copy link

@sungmanc sungmanc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for quick fix.

Copy link
Contributor

@sooahleex sooahleex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@vinnamkim vinnamkim merged commit 452d963 into openvinotoolkit:develop Mar 15, 2023
@vinnamkim vinnamkim deleted the bugfix/subset-length branch March 15, 2023 06:23
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