fix a major ddpg bug happening on some machines

This commit is contained in:
yangdsh 2020-05-25 04:59:39 +00:00 committed by Dana Van Aken
parent 96347e217c
commit 8bc1d68a26
1 changed files with 3 additions and 1 deletions

View File

@ -440,7 +440,7 @@ def train_ddpg(train_ddpg_input):
params = JSONUtil.loads(session.hyperparameters)
session_results = Result.objects.filter(session=session,
creation_time__lt=result.creation_time)
creation_time__lt=result.creation_time).order_by('pk')
results_cnt = len(session_results)
first_valid_result = -1
@ -485,6 +485,8 @@ def train_ddpg(train_ddpg_input):
objective = metric_data[target_obj_idx]
base_objective = base_metric_data[target_obj_idx]
prev_objective = prev_metric_data[target_obj_idx]
LOG.info('Target objective value: current: %s, base: %s, previous: %s'.\
format(objective, base_objective, prev_objective))
# Clean metric data
views = VIEWS_FOR_DDPG.get(dbms.type, None)