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

Drop a malformed transform from StackedTransform automatically #1001

Merged

Conversation

vinnamkim
Copy link
Contributor

@vinnamkim vinnamkim commented May 18, 2023

Summary

  • Ticket no. 106054
  • A malformed transform can be stacked on _StackTransform. Therefore, it would fail if the user tries to apply several transforms to the dataset sequentially and there exist malformed transforms. Also, once a malformed transform is given to Dataset.transform(), that transform permanently remains in the dataset, so creating a new dataset is the only way to solve it.
  • This patch pops up the malformed transform from the transform stack automatically if it raises an error at construction.

How to test

Unit tests are added for this change.

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

Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
@vinnamkim vinnamkim marked this pull request as ready for review May 18, 2023 04:40
@vinnamkim vinnamkim requested review from a team as code owners May 18, 2023 04:40
@vinnamkim vinnamkim added the BUG Something isn't working label May 18, 2023
@vinnamkim vinnamkim added this to the 1.3.0 milestone May 18, 2023
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
@codecov-commenter
Copy link

codecov-commenter commented May 18, 2023

Codecov Report

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

Comparison is base (3cd5f4d) 78.52% compared to head (763817c) 78.53%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1001      +/-   ##
===========================================
+ Coverage    78.52%   78.53%   +0.01%     
===========================================
  Files          233      233              
  Lines        26757    26770      +13     
  Branches      5323     5325       +2     
===========================================
+ Hits         21012    21025      +13     
  Misses        4496     4496              
  Partials      1249     1249              
Flag Coverage Δ
macos-11_Python-3.8 77.54% <100.00%> (+0.01%) ⬆️
ubuntu-20.04_Python-3.8 78.52% <100.00%> (?)
windows-2019_Python-3.8 78.42% <100.00%> (+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.75% <100.00%> (+0.33%) ⬆️

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

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

Copy link
Contributor

@bonhunko bonhunko left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@wonjuleee wonjuleee left a comment

Choose a reason for hiding this comment

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

It looks good to me for avoiding an error, but it may require to remove the root cause of an error when stacking transforms. Is there any way to resolve this?

Copy link
Contributor

@wonjuleee wonjuleee left a comment

Choose a reason for hiding this comment

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

It looks good to me for avoiding an error, but it may require to remove the root cause of an error when stacking transforms. Is there any way to resolve this?

@vinnamkim vinnamkim merged commit 1c15093 into openvinotoolkit:develop May 19, 2023
@vinnamkim vinnamkim deleted the bugfix/unstack-wrong-tranform branch May 19, 2023 03:03
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.

6 participants