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

Commit

Permalink
Bug fix for SQuAD example tuner. (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
tinytangent authored and xuehui1991 committed Oct 6, 2018
1 parent 2921e14 commit 4695434
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/tuners/ga_customer_tuner/customer_tuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def __str__(self):

def mutation(self, config=None, info=None, save_dir=None):
self.result = None
self.config = config
if config is not None:
self.config = config
self.config.mutation()
self.restore_dir = self.save_dir
self.save_dir = save_dir
Expand Down Expand Up @@ -121,8 +122,7 @@ def receive_trial_result(self, parameter_id, parameters, reward):
logger.debug(str(parameters))
logger.debug(str(reward))

indiv = graph_loads(parameters)
indiv.result = reward
indiv = Individual(graph_loads(parameters), result=reward)
self.population.append(indiv)
return

Expand Down

0 comments on commit 4695434

Please sign in to comment.