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

Refactor to implant optimizer and scheduler into model code #3258

Conversation

vinnamkim
Copy link
Contributor

  • Ticket no. 137451
  • Add OptimizerCallableSupportHPO and PicklableLRSchedulerCallable for HPO. They are picklable objects and OptimizerCallableSupportHPO allows access on its hyperparameters, e.g., lr.
  • Remove xfail marks from some of tests/integration/cli/test_cli.py::test_otx_hpo_e2e.
  • Implant optimizer and scheduler into efficientnet_b0 code as a test bed

Summary

How to test

Checklist

  • I have added unit tests to cover my changes.​
  • I have added integration tests to cover my changes.​
  • I have added e2e tests for validation.
  • 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

 - Add OptimizerCallableSupportHPO and PicklableLRSchedulerCallable for
   HPO
 - Implant optimizer and scheduler into efficientnet_b0 code as a testbed

Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
@github-actions github-actions bot added DEPENDENCY Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM TEST Any changes in tests BUILD OTX 2.0 labels Apr 3, 2024
@vinnamkim vinnamkim marked this pull request as ready for review April 3, 2024 00:54
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
@vinnamkim vinnamkim mentioned this pull request Apr 3, 2024
8 tasks
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
Copy link

codecov bot commented Apr 3, 2024

Codecov Report

Attention: Patch coverage is 78.94737% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 78.60%. Comparing base (2a70b74) to head (8454512).
Report is 10 commits behind head on develop.

❗ Current head 8454512 differs from pull request most recent head 25b0fbb. Consider uploading reports for the commit 25b0fbb to get more accurate results

Files Patch % Lines
src/otx/cli/install.py 25.00% 6 Missing ⚠️
src/otx/engine/hpo/hpo_api.py 16.66% 5 Missing ⚠️
src/otx/core/model/base.py 42.85% 4 Missing ⚠️
src/otx/core/optimizer/callable.py 89.47% 4 Missing ⚠️
src/otx/core/utils/jsonargparse.py 97.05% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3258      +/-   ##
===========================================
+ Coverage    75.70%   78.60%   +2.90%     
===========================================
  Files          179      182       +3     
  Lines        15165    15408     +243     
===========================================
+ Hits         11480    12111     +631     
+ Misses        3685     3297     -388     
Flag Coverage Δ
py310 78.60% <78.94%> (+2.90%) ⬆️
py311 78.59% <78.94%> (+2.89%) ⬆️

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.

harimkang
harimkang previously approved these changes Apr 4, 2024
@vinnamkim vinnamkim enabled auto-merge (squash) April 8, 2024 01:09
src/otx/engine/hpo/hpo_api.py Show resolved Hide resolved
src/otx/engine/hpo/hpo_api.py Outdated Show resolved Hide resolved
src/otx/core/optimizer/callable.py Outdated Show resolved Hide resolved
src/otx/engine/hpo/hpo_api.py Show resolved Hide resolved
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
@vinnamkim vinnamkim merged commit bc887ed into openvinotoolkit:develop Apr 9, 2024
13 checks passed
@vinnamkim vinnamkim mentioned this pull request Apr 16, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUILD DEPENDENCY Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM TEST Any changes in tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants