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 example accuracy and loss not updated + strategy.Proxyless() support #5072

Open mahdihey opened 2 years ago

mahdihey commented 2 years ago

Describe the issue: I'm running running ProxylessNAS example. The accuracy and loss haven't been updated after 112 epochs. image What is the expected behavior?

I found out that in 2.8 version strategy.Proxyless() was added in place of deprecated ProxylessTrainer(). Is there a plan to create a similar ProxylessNAS example? Or, how I can modify it for strategy.Proxyless()?

Environment:

Configuration:

Log message:

How to reproduce it?:

ultmaster commented 2 years ago

What is your search space? If it only contains LayerChoice and InputChoice, you can directly use the latest strategy.Proxyless().

Please note that the ProxylessNAS before v2.8 is known to be buggy. We rewrite the Proxyless in v2.9. You can checkout the master branch if you want to have a try.

mahdihey commented 2 years ago

I'm trying to perform exactly https://github.com/microsoft/nni/tree/master/examples/nas/oneshot/proxylessnas example. Using the same search space on mobilenet-like model and imagenet dataset. Is it possible to do the same exercise on the strategy.Proxyless()? If so, what changes should be done in the proxylessnas example?

mahdihey commented 2 years ago

How is the stability and robustness of strategy.Proxyless()? Has it been tested against some reference?

matluster commented 2 years ago

I'm trying to perform exactly https://github.com/microsoft/nni/tree/master/examples/nas/oneshot/proxylessnas example. Using the same search space on mobilenet-like model and imagenet dataset. Is it possible to do the same exercise on the strategy.Proxyless()? If so, what changes should be done in the proxylessnas example?

I think you might want to try strategy.Proxyless() on nni.retiarii.hub.pytorch.ProxylessNAS() space. But I think it won't work because: (1) Repeat is not supported by Proxyless strategy; (2) Latency loss is not supported. I have to admit this is kind of regression as of v2.8, but as I said in #5056, we have a plan for systematic support coming soon. Plus, the original version is known to be troublesome for a long time. Honestly I didn't anticipate many active users...

How is the stability and robustness of strategy.Proxyless()? Has it been tested against some reference?

I think I've tested ProxylessNAS on NAS-Bench-201 in #5052. It works fine in initial iterations, but I forgot to collect the final results (busy around other things recently). Though NB-201 is a toy search space, but believe it or not, the original ProxylessTrainer doesn't work on NB-201 at all. :(

If you are interested in, for example, supporting Repeat API for Proxyless strategy, contributions are always welcomed.