nni icon indicating copy to clipboard operation
nni copied to clipboard

How to use loss instead of accuray in HPO

Open 0i0i0i opened this issue 2 years ago • 0 comments

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:

  • NNI version: 2.7
  • Training service (local|remote|pai|aml|etc): local
  • Client OS: ubuntu
  • Server OS (for remote mode only):
  • Python version: 3.10
  • PyTorch/TensorFlow version: 2
  • Is conda/virtualenv/venv used?: conda
  • Is running in Docker?: no

Configuration:

  • Experiment config (remember to remove secrets!):
  • Search space:

Log message:

  • nnimanager.log:
  • dispatcher.log:
  • nnictl stdout and stderr:

How to reproduce it?:

0i0i0i avatar Oct 27 '23 06:10 0i0i0i