Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

fix bug when duplicated final results #1456

Merged
merged 2 commits into from
Aug 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/sdk/pynni/nni/hyperopt_tuner/hyperopt_tuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@ def receive_trial_result(self, parameter_id, parameters, value, **kwargs):
rval = self.CL_rval
else:
rval = self.rval
# ignore duplicated reported final result (due to aware of intermedate result)
if parameter_id not in self.running_data:
QuanluZhang marked this conversation as resolved.
Show resolved Hide resolved
logger.info("Received duplicated final result with parameter id: %s", parameter_id)
return
self.running_data.remove(parameter_id)

# update the reward of optimal_y
Expand Down