microsoft / nni

An open source AutoML toolkit for automate machine learning lifecycle, including feature engineering, neural architecture search, model compression and hyper-parameter tuning.
https://nni.readthedocs.io
MIT License
14k stars 1.81k forks source link

ProxylessNAS with latency threshold #4699

Open singagan opened 2 years ago

singagan commented 2 years ago

Would it be possible to add latency constraint in the NAS search in a way that NAS should not search for architectures that exceed a latency threshold? Something like what you did with SPOS example but I would like to do that with ProxylessNAS or DARTS. I am not able to find a way that I could make NAS skip models during the search phase. Thanks!

splurgein commented 2 years ago

I have the same question!

matluster commented 2 years ago

Currently no.

There's no straightforward approach to add latency threshold in ANY one-shot NAS algorithm. We'll keep that in backlog.

singagan commented 2 years ago

Ah I see. So to use latency threshold, the only option would be to switch to Multi-shot NAS approach, right?

matluster commented 2 years ago

Sorry for the late response.

I believe so. Or maybe you can somehow "hack" the one-shot NAS, and inject some latency-related loss into the architecture loss.