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

Refactoring ConvModule by removing act_cfg #3809

Merged
merged 12 commits into from
Aug 12, 2024

Conversation

sungchul2
Copy link
Contributor

@sungchul2 sungchul2 commented Aug 7, 2024

Summary

This PR includes:

  • Replace act_cfg with activation_callable
  • Remove build_activation_layer

How to test

Checklist

  • I have added unit tests to cover my changes.​
  • I have added integration tests to cover my changes.​
  • I have ran e2e tests and there is no issues.
  • I have added the description of my changes into CHANGELOG in my target branch (e.g., CHANGELOG in develop).​
  • I have updated the documentation in my target branch accordingly (e.g., documentation in develop).
  • I have linked related issues.

License

  • I submit my code changes under the same Apache 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) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

@github-actions github-actions bot added TEST Any changes in tests OTX 2.0 labels Aug 7, 2024
@github-actions github-actions bot added the DOC Improvements or additions to documentation label Aug 7, 2024
harimkang
harimkang previously approved these changes Aug 8, 2024
Copy link
Contributor

@harimkang harimkang 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

@eunwoosh eunwoosh 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 your work! I left some comments. Please take a look.

@harimkang
Copy link
Contributor

I've canceled the action of this PR due to issues with the integration test at the moment, please update when this PR is merged. #3815

Copy link
Contributor

@kprokofi kprokofi left a comment

Choose a reason for hiding this comment

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

Thank you for the update. I have a general question.
Can't we pass and use already instantiated activation instead of activation class (partial)?

Copy link

codecov bot commented Aug 8, 2024

Codecov Report

Attention: Patch coverage is 96.89922% with 4 lines in your changes missing coverage. Please review.

Project coverage is 80.67%. Comparing base (df498b7) to head (ce0d48c).

Files Patch % Lines
src/otx/algo/segmentation/backbones/litehrnet.py 55.55% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3809   +/-   ##
========================================
  Coverage    80.66%   80.67%           
========================================
  Files          272      272           
  Lines        27477    27459   -18     
========================================
- Hits         22165    22153   -12     
+ Misses        5312     5306    -6     
Flag Coverage Δ
py310 80.64% <96.89%> (+0.23%) ⬆️
py311 80.42% <96.89%> (-0.14%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sungchul2
Copy link
Contributor Author

Thank you for the update. I have a general question. Can't we pass and use already instantiated activation instead of activation class (partial)?

I considered this before, but I haven't proceeded for now because original ConvModule's purpose is an instantiation using given dict config, such as conv_cfg, norm_cfg, or act_cfg.
I just updated this module maintaining this purpose, but I will try your suggestion if you or others (@harimkang, @eunwoosh, or any others 😊) think that using conv, norm, or activation instances as is is needed.
I think adding this is not hard work.

@eunwoosh
Copy link
Contributor

eunwoosh commented Aug 9, 2024

Thank you for the update. I have a general question. Can't we pass and use already instantiated activation instead of activation class (partial)?

I considered this before, but I haven't proceeded for now because original ConvModule's purpose is an instantiation using given dict config, such as conv_cfg, norm_cfg, or act_cfg. I just updated this module maintaining this purpose, but I will try your suggestion if you or others (@harimkang, @eunwoosh, or any others 😊) think that using conv, norm, or activation instances as is is needed. I think adding this is not hard work.

I actually think this approach when reviewing norm refactoring but it also can be activation layer. I think current approach is ok but Kirill's opinion is also good.

@sungchul2
Copy link
Contributor Author

Thank you for the update. I have a general question. Can't we pass and use already instantiated activation instead of activation class (partial)?

I'll try this targeting the next version as a new minor feature, conv and normalization can be also appiled.

@sungchul2 sungchul2 added this pull request to the merge queue Aug 12, 2024
Merged via the queue into openvinotoolkit:develop with commit 1a8e10e Aug 12, 2024
20 checks passed
@sungchul2 sungchul2 deleted the remove-act_cfg branch August 12, 2024 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DOC Improvements or additions to documentation TEST Any changes in tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants