MDL-66394 analytics: Extra GC during analysis

(backport of MDL-66234)
This commit is contained in:
David Monllaó
2019-09-24 14:08:24 +02:00
committed by Eloy Lafuente (stronk7)
parent 26c79027ff
commit 0a397e3fd2
5 changed files with 21 additions and 5 deletions
@@ -70,6 +70,8 @@ class train_models extends \core\task\scheduled_task {
continue;
}
$renderer = $PAGE->get_renderer('tool_analytics');
$result = $model->train();
// Reset the page as some indicators may call external functions that overwrite the page context.
@@ -77,8 +79,6 @@ class train_models extends \core\task\scheduled_task {
if ($result) {
echo $OUTPUT->heading(get_string('modelresults', 'tool_analytics', $model->get_name()));
$renderer = $PAGE->get_renderer('tool_analytics');
echo $renderer->render_get_predictions_results($result, $model->get_analyser()->get_logs());
}
}