Open jaypatravali opened 2 years ago
You have to call nni.report_final_result
(or intermediate) in the main process. When you enter the subprocess, the context is missing, therefore the report_xxx_result
APIs might not be available.
A related issue for your reference #4869 , in where the provided solution also does not support reporting intermediate result. The reason has been explained by @ultmaster.
Currently, one hacky way is the subprocess outputs intermediate results to a file and the main process polls the file to read the intermediate results and calls nni.report_intermediate_result
in the main process.
We will support nni.report_intermediate_result
in subprocess in nni v3.0
Describe the issue:
I am running mmdetection and call the nni engine from a script after defining paths, logdirs etc.
It looks like this
the mmdet config has workflow = [('train', 1), ('val', 1)]
I wish to use the early stopping feature and add nni.report_intermediate_result(val_acc) while the subprocess initiates training and validation from cmd. Can you help me arrive at a solution?
Environment: