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] Estimate sub-model latency in the process of NAS #568

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

FuNian788
Copy link

Motivation

I tried to add latency constrains in NAS (add constraints_range=dict(latency=(0., 10.)) in dict train_cfg of configs/nas/mmcls/spos/spos_mobilenet_search_8xb128_in1k.py), but found there was no time measurement actually.

Through this PR, sub-model time measurement will be properly performed in NAS.

Reason of bug

When we get sub-model informations as 'flops / params / latency' in mmrazor/engine/runner/utils/check.py, we need results from function estimator.estimate. However, variable latency_cfg is not provided to function estimator.estimate, and latency_cfg is default to None. Then measure_latency will be always False in mmrazor/models/task_modules/estimators/resource_estimator.py and no time measurement will be produced.

Modification

Add Args measure_latency in function estimator.estimate. Make some code modification.

@OpenMMLab-Assistant-004

Hi @FuNian788,

We'd like to express our appreciation for your valuable contributions to the mmrazor. Your efforts have significantly aided in enhancing the project's quality.
It is our pleasure to invite you to join our community thorugh Discord_Special Interest Group (SIG) channel. This is a great place to share your experiences, discuss ideas, and connect with other like-minded people. To become a part of the SIG channel, send a message to the moderator, OpenMMLab, briefly introduce yourself and mention your open-source contributions in the #introductions channel. Our team will gladly facilitate your entry. We eagerly await your presence. Please follow this link to join us: ​https://discord.gg/UjgXkPWNqA.

If you're on WeChat, we'd also love for you to join our community there. Just add our assistant using the WeChat ID: openmmlabwx. When sending the friend request, remember to include the remark "mmsig + Github ID".

Thanks again for your awesome contribution, and we're excited to have you as part of our community!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants