No threshold in config file for ReAct
PyJulie opened this issue · 8 comments
File "/mnt/sda/julie/projects/OSR/OpenOOD-main/OpenOOD-main/openood/postprocessors/react_postprocessor.py", line 41, in postprocess
output = net.forward_threshold(data, self.threshold)
AttributeError: 'ReactPostprocessor' object has no attribute 'threshold'
Could you include more info, for example what were you running/calling when seeing this error? self.threshold
is set in
OpenOOD/openood/postprocessors/react_postprocessor.py
Lines 47 to 52 in 63e0c79
I just followed the provided script and run it. It seems that set_hyperapram did not initially work before postprocess function?
Were you running without APS mode? If so, I might know what's the problem.
Hi, I was truly running in APS mode.
I found that
OpenOOD/openood/evaluation_api/evaluator.py
Lines 118 to 157 in 63e0c79
line 118 postprocessor.setup works before line 157 self.hyperparam_search().
Unfortunately, new commit may not work either since self.activation_log should be pre-defined.
I added it into def postprocess(self, net: nn.Module, data: Any) function,
and the codes ran successfully but I am not sure if I got the expected results.
I will further try to solve this issue and pull a commit.
Thank you!
If you were running in APS mode then that's weird because during hyperparameter search the evaluator will call set_hyperparam
which in turn sets self.threshold
for react. Without APS mode indeed it was a bug that self.threshold
was missing.