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
14.06k stars 1.82k forks source link

How to use loss instead of accuray in HPO #5702

Open 0i0i0i opened 1 year ago

0i0i0i commented 1 year ago

Describe the issue: I just started using nni and followed the /hpo_quickstart_pytorch/ example to inplement. But, instead of accuracy, I need to thave the main monitor and optimize for the loss, and the lower loss, the better, obviously.

I used nni.report_intermediate_result(valLossSingle) to report the loss. I think I need to let the tuner know that this is actually loss, rather than accuracy. How to do that?

Environment:

Configuration:

Log message:

How to reproduce it?: