From 8bc1d68a261721cc71e8295ab80f7e8f5d752daf Mon Sep 17 00:00:00 2001 From: yangdsh Date: Mon, 25 May 2020 04:59:39 +0000 Subject: [PATCH] fix a major ddpg bug happening on some machines --- server/website/website/tasks/async_tasks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/website/website/tasks/async_tasks.py b/server/website/website/tasks/async_tasks.py index 4bac757..1d69446 100644 --- a/server/website/website/tasks/async_tasks.py +++ b/server/website/website/tasks/async_tasks.py @@ -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)